* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header h1 i {
    color: #4285f4;
    margin-right: 10px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.user-menu span {
    font-weight: 500;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Auth Section */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.auth-box h2 i {
    color: #4285f4;
    margin-right: 10px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #4285f4;
    border-bottom: 2px solid #4285f4;
    margin-bottom: -2px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form label {
    display: block;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9rem;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #4285f4;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.auth-error {
    color: #c62828;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #f5f5f5;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.autocomplete-item-address {
    font-size: 0.85rem;
    color: #666;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.tab-btn.active {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.search-content {
    display: none;
}

.search-content.active {
    display: block;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #4285f4;
}

.search-box button {
    padding: 15px 30px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #3367d6;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Places List */
.places-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.place-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.place-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.place-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333;
}

.place-card p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.place-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: #ffc107;
}

.rating-number {
    font-weight: bold;
    color: #333;
}

.review-count {
    color: #666;
    font-size: 0.9rem;
}

/* Reviews Section */
.reviews-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.business-info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.business-info p {
    color: #666;
    margin-bottom: 10px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.business-actions {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: #4285f4;
    color: white;
}

.btn-primary:hover {
    background: #3367d6;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Reviews Slider */
.reviews-slider-container {
    position: relative;
    overflow: hidden;
}

.reviews-slider {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.review-card {
    min-width: 100%;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-meta h4 {
    color: #333;
    margin-bottom: 5px;
}

.review-meta .stars {
    font-size: 0.9rem;
}

.review-time {
    color: #999;
    font-size: 0.85rem;
}

.review-text {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

.review-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    background: none;
    border: none;
    color: #4285f4;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 8px;
    padding: 0;
    text-decoration: underline;
}

.read-more-btn:hover {
    opacity: 0.8;
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #4285f4;
}

/* Dashboard */
.dashboard-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.widgets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.widget-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #4285f4;
}

.widget-card h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.widget-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.widget-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.widget-card-actions {
    display: flex;
    gap: 10px;
}

.widget-card-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.3s;
}

.widget-card-actions button:hover {
    opacity: 0.8;
}

.btn-edit {
    background: #4285f4;
    color: white;
}

.btn-view {
    background: #34a853;
    color: white;
}

.no-widgets {
    text-align: center;
    color: #666;
    padding: 40px;
    grid-column: 1 / -1;
}

/* Search Header */
.search-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.search-header h2 {
    color: #333;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 30px;
}

.modal-body label {
    display: block;
    margin-bottom: 15px;
    color: #555;
}

.modal-body label input[type="text"],
.modal-body label input[type="color"],
.modal-body label select {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.modal-body label input[type="checkbox"] {
    margin-right: 8px;
}

#embedCode,
#editEmbedCode {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 20px;
}

.embed-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.embed-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
}

.embed-options select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.copy-message {
    color: #4caf50;
    margin-top: 10px;
    font-weight: bold;
}

/* Edit Form */
.edit-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.preview-section {
    margin: 20px 0;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
}

.preview-section h4 {
    margin-bottom: 10px;
}

.embed-section {
    margin: 20px 0;
}

.embed-section h4 {
    margin-bottom: 10px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .places-list {
        grid-template-columns: 1fr;
    }
    
    .business-header {
        flex-direction: column;
    }
    
    .business-actions {
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        flex: 1;
    }
    
    .review-card {
        padding: 20px;
    }
}
