* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Core palette — Indigo + Teal + Amber */
    --primary: #4f46e5;        /* Indigo 600 */
    --primary-dark: #3730a3;   /* Indigo 700 */
    --secondary: #0d9488;      /* Teal 600 */
    --secondary-dark: #0f766e; /* Teal 700 */
    --accent: #f59e0b;         /* Amber 500 */
    --accent-dark: #d97706;    /* Amber 600 */

    /* Neutrals */
    --dark: #1e1b4b;           /* Deep indigo for headings */
    --gray: #6b7280;
    --light-gray: #f0f4ff;     /* Soft indigo tint bg */
    --blue: #2563eb;

    /* Layout */
    --bg: #f8faff;
    --card-bg: #ffffff;
    --text: #1f2937;
    --header-bg: #ffffff;
    --shadow: rgba(79, 70, 229, 0.10);
    --border: #e5e7eb;
}

body.dark-mode {
    --primary: #818cf8;        /* Indigo 400 — lighter for dark bg */
    --primary-dark: #6366f1;
    --secondary: #2dd4bf;      /* Teal 400 */
    --secondary-dark: #14b8a6;
    --accent: #fbbf24;
    --accent-dark: #f59e0b;
    --dark: #e0e7ff;
    --gray: #9ca3af;
    --light-gray: #1e1e2e;
    --bg: #0f0f1a;
    --card-bg: #1a1a2e;
    --text: #e2e8f0;
    --header-bg: #13131f;
    --shadow: rgba(0,0,0,0.5);
    --border: #2d2d44;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER ===== */
header {
    background-color: var(--header-bg);
    box-shadow: 0 1px 0 var(--border), 0 4px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo i { color: var(--accent); }

nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
}

nav a:hover::after { width: 100%; }
nav a:hover { color: var(--primary); }

body.dark-mode nav a { color: #9ca3af; }
body.dark-mode nav a:hover { color: var(--primary); }

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dark mode toggle */
.dark-toggle {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--light-gray);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s;
}

body.dark-mode .hamburger span { background: #ccc; }

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    display: none;
    background: var(--header-bg);
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.mobile-nav.open { display: block; }

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav ul li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: background 0.2s;
}

body.dark-mode .mobile-nav ul li a { color: #ccc; }
.mobile-nav ul li a:hover { background: rgba(0,0,0,0.05); }

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

/* ===== HERO ===== */
.hero {
    padding: 90px 0 80px;
    background: linear-gradient(160deg, #f8faff 0%, #eef2ff 50%, #f0fdfa 100%);
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

body.dark-mode .hero {
    background: linear-gradient(160deg, #0f0f1a 0%, #13131f 60%, #0d1a1a 100%);
}

/* subtle decorative blob */
.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79,70,229,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    position: relative;
}

.hero-text { flex: 1; }

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.18);
    transition: transform 0.4s;
}

.hero-image img:hover { transform: scale(1.02) rotate(0.5deg); }

h1 {
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.05rem;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.7;
}

.highlight {
    color: var(--primary);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search bar */
.hero-search {
    display: flex;
    gap: 0;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    max-width: 500px;
    border: 1.5px solid var(--border);
}

.hero-search input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    background: var(--card-bg);
    color: var(--text);
}

.hero-search button {
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.hero-search button:hover { opacity: 0.9; }

/* ===== HOW IT WORKS ===== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-title p { color: var(--gray); font-size: 1.05rem; }
.works {
    padding: 90px 0;
    background: linear-gradient(180deg, #eef2ff 0%, #f0fdfa 100%);
    transition: background 0.3s;
}

body.dark-mode .works {
    background: linear-gradient(180deg, #13131f 0%, #0d1a1a 100%);
}

.works-steps {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 220px;
    text-align: center;
    padding: 35px 25px;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.15);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 700;
}

body.dark-mode .step h3 { color: #c7d2fe; }

/* ===== CATEGORIES ===== */
.categories {
    padding: 90px 0;
    background-color: var(--bg);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(79, 70, 229, 0.18);
}

.category-icon {
    padding: 32px;
    text-align: center;
    font-size: 2.8rem;
    color: white;
    position: relative;
}

.category-content { padding: 22px; }

.category-content h3 {
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 1.15rem;
    font-weight: 700;
}

body.dark-mode .category-content h3 { color: #c7d2fe; }
body.dark-mode .category-content p { color: var(--gray); }

/* ===== FEATURED ITEMS ===== */
.featured {
    padding: 90px 0;
    background: linear-gradient(180deg, #f0f4ff 0%, #f0fdfa 100%);
    transition: background 0.3s;
}

body.dark-mode .featured {
    background: linear-gradient(180deg, #13131f 0%, #0d1a1a 100%);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.item-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.15);
}

.item-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.item-details { padding: 20px; }

.item-details h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 700;
}

body.dark-mode .item-details h3 { color: #c7d2fe; }

.item-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: var(--gray);
}

.item-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 14px;
}

body.dark-mode .item-price { color: #a5b4fc; }

.item-actions { display: flex; gap: 10px; }

.btn-small {
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.btn-rent {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    flex: 2;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.btn-rent:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-borrow {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    flex: 1;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.3);
}

.btn-borrow:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== AI FEATURES ===== */
.ai-features {
    padding: 90px 0;
    background-color: var(--bg);
}

.ai-feature-card {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.ai-feature-card:hover { transform: translateY(-4px); }

.ai-feature-content {
    flex: 2;
    padding: 40px;
}

.ai-feature-content h2 {
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 1.6rem;
}

body.dark-mode .ai-feature-content h2 { color: #c7d2fe; }

.ai-feature-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ai-feature-visual i {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===== STATS ===== */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    position: relative;
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 8px;
    font-weight: 800;
}

.stat-item p { font-size: 1rem; opacity: 0.85; }

/* ===== CTA ===== */
.cta {
    padding: 90px 0;
    background: linear-gradient(135deg, var(--dark) 0%, #312e81 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    color: white;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.85;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0e2a 100%);
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    color: #a5b4fc;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column p { color: #9ca3af; line-height: 1.7; font-size: 0.95rem; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }

.footer-column a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-column a:hover { color: #a5b4fc; }

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card-bg);
    color: var(--text);
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: #4CAF50; }
.toast.error { border-left-color: #f44336; }
.toast.info { border-left-color: #2196F3; }

.toast i { font-size: 1.2rem; }
.toast.success i { color: #4CAF50; }
.toast.error i { color: #f44336; }
.toast.info i { color: #2196F3; }

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1rem;
    padding: 0 4px;
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100px); opacity: 0; }
}

/* ===== CATEGORY PAGE ===== */
.category-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: var(--bg);
    min-height: 100vh;
    transition: background 0.3s;
}

.category-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 35px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.25);
}

.category-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    color: white;
    font-weight: 800;
}

.category-header p {
    margin: 0;
    opacity: 0.88;
    font-size: 1.05rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--card-bg);
    color: var(--text);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.back-button:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    transform: translateX(-4px);
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

body.dark-mode .stat-value { color: #a5b4fc; }

.stat-label {
    font-size: 0.88rem;
    color: var(--gray);
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 5px 20px var(--shadow);
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
}

.items-table thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.items-table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.items-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.items-table tbody tr:hover { background-color: var(--light-gray); }
.items-table tbody tr:last-child { border-bottom: none; }

.items-table td {
    padding: 16px;
    color: var(--text);
    font-size: 0.95rem;
}

.item-name { font-weight: 700; color: var(--dark) !important; }
body.dark-mode .item-name { color: #c7d2fe !important; }

.item-condition {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.condition-excellent { background: #ecfdf5; color: #065f46; }
.condition-good { background: #fffbeb; color: #92400e; }
.condition-new { background: #eff6ff; color: #1e40af; }

body.dark-mode .condition-excellent { background: #064e3b; color: #6ee7b7; }
body.dark-mode .condition-good { background: #451a03; color: #fcd34d; }
body.dark-mode .condition-new { background: #1e3a5f; color: #93c5fd; }

.rent-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: opacity 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.rent-button:hover { opacity: 0.88; transform: translateY(-1px); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top.visible { display: flex; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(79, 70, 229, 0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-content { flex-direction: column; text-align: center; }
    h1 { font-size: 2.5rem; }
    .ai-feature-card { flex-direction: column; }
    .hero-search { max-width: 100%; }
}

@media (max-width: 768px) {
    nav, .auth-buttons { display: none; }
    .hamburger { display: flex; }

    h1 { font-size: 2rem; }
    .section-title h2 { font-size: 2rem; }
    .works-steps { flex-direction: column; }
    .toast-container { bottom: 15px; right: 15px; left: 15px; }
    .toast { min-width: unset; }
    .scroll-top { bottom: 15px; left: 15px; }
}

/* ===== UTILITY ===== */
.star-icon { color: var(--accent); }
.check-icon { color: var(--secondary); }

body.dark-mode .check-icon { color: #2dd4bf; }

/* CTA buttons */
.cta .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.cta .btn-primary:hover {
    background: #f0f4ff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.cta .btn-outline {
    border-color: rgba(255,255,255,0.6);
    color: white;
}

.cta .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    color: white;
}

/* ===== AUTH MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 35px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-close:hover { background: var(--light-gray); }

.modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
}

.modal-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
