/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --accent-light: rgba(139, 92, 246, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ===== Hero Section ===== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-arrow {
    transition: var(--transition);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ===== Tools Section ===== */
.tools-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

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

.tool-card {
    position: relative;
    display: block;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition-slow);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

.tool-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.tool-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.tag-new {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Ad Section ===== */
.ad-section {
    padding: 40px 0;
    text-align: center;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-icon {
    font-size: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 6px 0;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.8rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Privacy Section ===== */
.privacy-section {
    padding: 60px 0;
}

.privacy-banner {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 2px solid var(--success);
    border-radius: var(--radius-xl);
}

.privacy-icon {
    font-size: 4rem;
    flex-shrink: 0;
}

.privacy-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--success);
}

.privacy-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.privacy-content .highlight {
    font-weight: 700;
    color: var(--danger);
    text-decoration: underline;
}

.privacy-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.privacy-list li {
    font-size: 0.95rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .privacy-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .privacy-list {
        grid-template-columns: 1fr;
    }
}

/* ===== Toast Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ===== Language Switcher ===== */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.lang-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.lang-icon {
    font-size: 1.1rem;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: left;
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--bg-hover);
}

.lang-option.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile language switcher */
@media (max-width: 768px) {
    .lang-switcher {
        width: 100%;
    }
    
    .lang-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .lang-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--bg-tertiary);
        border-radius: var(--radius-sm);
        margin-top: 8px;
    }
}
