:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(20, 27, 45, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #8b5cf6;
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--secondary); bottom: -200px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #3b82f6; top: 40%; left: 50%; animation-delay: -10s; }

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

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo strong { font-weight: 700; color: var(--primary); }
.logo i { color: var(--secondary); }
    
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switch {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.github-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Main Layout */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    white-space: nowrap;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Search Input */
.search-container {
    width: 100%;
    margin-bottom: 3rem;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary);
}

input[type="text"] {
    width: 100%;
    padding: 1.5rem 3rem 1.5rem 3.5rem;
    font-size: 1.2rem;
    font-family: inherit;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    color: var(--text-main);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.clear-btn {
    position: absolute;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    display: none;
}

.clear-btn:hover { color: var(--text-main); }

.loading-indicator {
    margin-top: 1rem;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Results Grid */
.results-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease forwards;
}

.hidden { display: none !important; }

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

.tag-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s;
    cursor: default;
}

.tag-card:hover { transform: translateY(-5px); border-color: rgba(139, 92, 246, 0.4); }


.tag-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tag-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.tag-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}

.tag-card.title-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
}

.tag-card.title-card .tag-value {
    font-size: 2rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Docs Section */
.docs-section {
    width: 100%;
    margin-top: 4rem;
    animation: fadeIn 0.5s ease forwards;
}

.docs-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #cbd5e1;
}

.docs-section h2 i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
}

.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.doc-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-card h3 i {
    color: var(--secondary);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.doc-table th, .doc-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.doc-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.doc-table td:first-child {
    font-weight: 600;
    color: #c4b5fd;
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; white-space: normal; }
    input[type="text"] { font-size: 1rem; }
}

/* Compare Mode Styles */
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.mode-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-muted);
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mode-btn:hover {
    color: var(--text-main);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.compare-inputs-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    animation: fadeIn 0.3s ease forwards;
}

.compare-vs {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.6rem 0.8rem;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.compare-results-container {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease forwards;
}

.winner-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.winner-banner.winner-a {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.winner-banner.winner-b {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.winner-banner.draw {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

.winner-icon {
    font-size: 1.8rem;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.compare-table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 500px;
}

.compare-table th, .compare-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
}

.compare-table td.property-name {
    font-weight: 600;
    color: #c4b5fd;
    width: 25%;
}

.compare-table td.value-col {
    width: 37.5%;
    font-weight: 500;
}

.compare-table tr:last-child th, .compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr.score-row {
    background: rgba(139, 92, 246, 0.08);
}

.compare-table tr.score-row td {
    font-size: 1.25rem;
    font-weight: 700 !important;
}

.better-val {
    color: #34d399 !important;
    font-weight: 700 !important;
}

.better-badge-ui {
    display: inline-block;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.worse-val {
    color: var(--text-muted) !important;
    text-decoration: line-through;
    opacity: 0.6;
}

.draw-val {
    color: var(--text-main);
}

@media (max-width: 768px) {
    .compare-inputs-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    .compare-vs {
        margin: 0.2rem 0;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 5% 1rem 5%;
    }
    .nav-controls {
        gap: 1rem;
    }
}

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-content p {
    margin: 0.4rem 0;
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.install-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
    text-align: center;
}

.install-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.install-section h2 {
    font-size: 2rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.install-section h2 i {
    color: var(--primary);
}

.install-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
}

.install-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    color: #a78bfa;
    font-weight: 600;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Documentation Legend & Quality Stars */
.docs-legend {
    background: rgba(30, 27, 75, 0.15);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.legend-title {
    font-weight: 700;
    color: #c4b5fd;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stars {
    color: #f59e0b; /* Golden amber stars */
    font-weight: 700;
    letter-spacing: 1px;
}
