:root {
    /* Premium Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-glow: rgba(99, 102, 241, 0.1);

    /* System Tokens */
    --container-width: 1280px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    content-visibility: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.logo span {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}

/* Hero bottom border for clean separation */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.05em;
    line-height: 1.1;
    color: var(--text-main);
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 3.5rem;
    position: relative;
    z-index: 2;
}

/* Search Bar */
.search-container {
    max-width: 680px;
    margin: 0 auto;
    background: #ffffff;
    padding: 0.6rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.search-container:focus-within {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 1rem;
    font-size: 1.05rem;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-weight: 500;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* Grid Layout */
.section-title {
    margin: 5rem 0 2rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Generator Tool Page Style */
.generator-container {
    max-width: 1000px;
    margin: 4rem auto;
    background-color: var(--card-bg);
    padding: 4rem;
    border-radius: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

.control-group {
    margin-bottom: 2rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

.control-group input:focus,
.control-group select:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-generate {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-generate:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.results-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.result-item {
    padding: 1.25rem;
    background-color: var(--bg-color);
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.copy-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: var(--secondary-hover);
}

/* Content Sections (SEO) */
.content-section {
    max-width: 1000px;
    margin: 6rem auto 0;
    padding: 4rem;
    background-color: var(--card-bg);
    border-radius: 2.5rem;
    border: 1px solid var(--border-color);
}

.content-section h2 {
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.content-section p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer Styles */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 3rem;
    margin-top: 8rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links-list a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.25rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-4px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Ads Space */
.ad-space {
    background-color: rgba(99, 102, 241, 0.03);
    border: 1px dashed var(--border-color);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3rem 0;
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col:first-child {
        grid-column: span 2;
    }

    .hero {
        padding: 5rem 0 3rem;
    }

    .generator-container {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
        margin: 2rem auto;
    }

    .content-section {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
        margin: 2rem auto;
    }

    .section-title {
        font-size: 1.4rem;
        margin: 3rem 0 1.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .tool-card {
        padding: 1.5rem 1rem;
    }

    .ad-space {
        min-height: 80px;
        font-size: 0.75rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col:first-child {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .tool-card {
        padding: 1.25rem 0.75rem;
    }

    .tool-card i {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .tool-card h3 {
        font-size: 1rem;
    }

    .tool-card p {
        font-size: 0.8rem;
    }

    .generator-container {
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }

    .content-section {
        padding: 1.5rem 1rem;
    }

    .btn-generate {
        font-size: 1rem;
        padding: 1rem;
    }

    .search-container {
        flex-direction: column;
        border-radius: 1rem;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .search-btn {
        width: 100%;
        border-radius: 0.75rem;
    }

    .search-input {
        padding: 0.5rem;
        width: 100%;
    }
}

/* Animations */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--primary-color);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}