:root {
    --primary: #1a3a5c;
    --primary-light: #2c5f8a;
    --secondary: #c9a84c;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #6c757d;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
    --transition: 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --bg: #121212;
    --bg-card: #1e1e2e;
    --text: #e0e0e0;
    --text-secondary: #a0a0b0;
    --primary: #4a7c9e;
    --primary-light: #6a9cc0;
    --secondary: #d4b85a;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

[data-template="tech"] {
    --primary: #0d7377;
    --secondary: #ff6b6b;
}

[data-template="fashion"] {
    --primary: #e84393;
    --secondary: #6c5ce7;
}

[data-template="food"] {
    --primary: #e17055;
    --secondary: #00b894;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

/* Header */
.header {
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-brand i {
    margin-right: 8px;
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.nav-menu a:hover {
    background: var(--primary);
    color: #fff;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
}

.nav-actions button {
    background: var(--bg);
    border: 1px solid var(--text-secondary);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
}

.nav-actions button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 250px;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-bar button {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 30px;
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: #b8943a;
    transform: translateY(-2px);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filters select {
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.filters select option {
    color: #333;
}

/* Cards */
.cards-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.cards-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition);
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

.rating i {
    color: #ddd;
    font-size: 0.9rem;
}

.rating i.active {
    color: #f1c40f;
}

.btn-book {
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-book:hover {
    background: var(--primary-light);
}

/* Stats */
.stats-section {
    padding: 60px 5%;
    background: var(--bg-card);
}

.stats-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item span:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Heatmap */
.heatmap-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.heatmap-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.heatmap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.heatmap-item {
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    cursor: default;
    transition: var(--transition);
}

.heatmap-item[data-popularity] {
    background: hsl(200, 60%, calc(80% - var(--popularity) * 0.5%));
}

.heatmap-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background: var(--primary);
    color: #fff;
    padding: 40px 5% 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
}

.footer-section ul li a:hover {
    color: var(--secondary);
}

.social-share {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-share a {
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-share a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
}

.footer-bottom a {
    color: var(--secondary);
}

/* Admin */
.admin-body {
    background: var(--bg);
}

.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-primary {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-light);
}

.login-hint {
    text-align: center;
    margin-top: 1rem;
}

.admin-dashboard {
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    color: var(--primary);
}

.admin-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-logout, .btn-view {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
}

.btn-logout {
    background: #e74c3c;
    color: #fff;
}

.btn-view {
    background: var(--primary);
    color: #fff;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: #fff;
}

.tab-content {
    display: none;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.service-list {
    margin-top: 1rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.btn-danger {
    background: #e74c3c;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card h3 {
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.stat-card ul {
    list-style: none;
}

.stat-card ul li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
}

/* Inner Pages */
.page-content {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-content h1 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .search-bar input {
        min-width: 200px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }