/* ===========================
   CSS VARIABLES & RESET
   =========================== */

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

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #10b981;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --accent: #8b5cf6;
    --navbar-bg: #ffffff;
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #10b981 100%);
}

[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --navbar-bg: #111827;
}

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

.hero {
    background: var(--gradient);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--border);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}


 [data-theme="dark"] .hero {
    background: linear-gradient(to right, #111827, #1f2937);
        }

 [data-theme="dark"] .hero-para {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
        }

 [data-theme="dark"] .hero h1 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
        }

[data-theme="dark"] .hero-stats span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border: 1px solid #7c3aed;
        }


/* ===========================
   MAIN CONTAINER
   =========================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ===========================
   SEARCH SECTION
   =========================== */

.search-section {
    margin-bottom: 3rem;
}

.search-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 33%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    z-index: 1;
}

#searchInput {
    width: 100%;
    padding: 18px 24px 18px 60px;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===========================
   KEYWORDS GRID
   =========================== */

.keywords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.keyword-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.keyword-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.keyword-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
    border-color: var(--primary);
}

.keyword-card:hover::before {
    transform: scaleX(1);
}

.keyword-card.active {
    background: var(--gradient);
    color: white;
    transform: scale(1.02);
    border-color: transparent;
}

.keyword-card.active::before {
    transform: scaleX(1);
    background: white;
}

.keyword-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.keyword-card.active .keyword-title {
    color: white;
}

.keyword-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.keyword-card.active .keyword-description {
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   DETAIL PANEL
   =========================== */

.detail-panel {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px var(--shadow-lg);
    display: none;
    border: 2px solid var(--border);
    animation: slideUp 0.4s ease;
}

.detail-panel.active {
    display: block;
}

.detail-header {
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 20px;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.detail-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 30px;
    height: 30px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* ===========================
   CODE BLOCKS
   =========================== */

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.code-block:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.keyword {
    color: #569cd6;
    font-weight: bold;
}

.string {
    color: #ce9178;
}

.number {
    color: #b5cea8;
}

/* ===========================
   OUTPUT BLOCKS
   =========================== */

.output-block {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.output-block:hover {
    background: var(--bg-primary);
    border-left-width: 6px;
}

.output-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.output-table th {
    background: var(--gradient);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.output-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.output-table tr:hover {
    background: var(--bg-secondary);
}

/* ===========================
   NO RESULTS
   =========================== */

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    animation: fadeIn 0.5s ease;
    grid-column: 1 / -1;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {

    .hero h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stats span {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

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

    .detail-panel {
        padding: 24px;
    }

    .detail-title {
        font-size: 2rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .container {
        padding: 2rem 1rem;
    }

    .search-box {
        margin: 0 1rem;
    }

    #searchInput {
        padding: 14px 20px 14px 50px;
        font-size: 1rem;
    }

    .search-icon {
        left: 20px;
        top: 23%;
        
    }

    .search-hint {
    text-align: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
    margin-left: -8px;
    display: auto;
    align-items: auto;
    justify-content: auto;
    gap: 1px;
}

    .cookie-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .cookie-settings-content {
        padding: 20px;
    }
}