/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors */
    --primary-color: #6366f1;
    --primary-dark: #4338ca;
    --primary-light: #a5b4fc;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --accent-color: #f59e0b;
    
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --tool-card-bg: #ffffff;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-color: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    
    --header-bg: rgba(15, 23, 42, 0.95);
    --card-bg: #1e293b;
    --tool-card-bg: #1e293b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px var(--shadow-color);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.view-all {
    font-weight: 600;
    color: var(--primary-color) !important;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 280px;
    background: var(--card-bg);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    margin-top: 3rem;
}

.mobile-nav-menu li {
    margin-bottom: 1rem;
}

.mobile-nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

/* Advertisement Styles */
.ad-banner, .ad-sidebar {
    margin: 1rem 0;
}

.ad-header {
    margin-top: 80px; /* Account for fixed header */
}

.ad-placeholder {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 0.5rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-content .ad-placeholder {
    min-height: 200px;
}

.ad-sidebar .ad-placeholder {
    min-height: 250px;
}

/* Main Content */
.main-content {
    margin-top: 80px; /* Account for fixed header */
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color)10, transparent 70%);
    opacity: 0.1;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-icon {
    font-size: 8rem;
    color: var(--primary-light);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-tool {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-tool:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.popular-tools,
.all-tools,
.about-section {
    padding: 4rem 0;
}

.popular-tools {
    background-color: var(--bg-secondary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: var(--tool-card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.tool-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--tool-card-bg) 0%, var(--bg-secondary) 100%);
}

.tool-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Content with Sidebar Layout */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.main-tools-content {
    min-width: 0; /* Prevents grid overflow */
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem 0;
}

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

.footer-section h3,
.footer-section h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .popular-tools,
    .all-tools,
    .about-section {
        padding: 2rem 0;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}