:root {
    --bg-dark: #0f172a;
    --accent-primary: #facc15;
    /* Vibrant Yellow */
    --accent-secondary: #a855f7;
    /* Electric Purple */
    --accent-tertiary: #22c55e;
    /* Green */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 243, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 247, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo-text span {
    color: var(--accent-primary);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Hero */
.hero {
    padding: 10rem 0 6rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-title span {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: #ffffff;
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Tools Section */
.tools-section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tool-preview {
    height: 180px;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-preview div {
    font-size: 5rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.coin-icon {
    animation: floating 3s ease-in-out infinite;
}

.wheel-icon {
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tool-card:hover .tool-preview div {
    transform: scale(1.2) rotate(5deg);
}

.dice-roller-preview {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.coin-flip-preview {
    background: linear-gradient(135deg, #475569, #94a3b8);
}

.wheel-preview {
    background: linear-gradient(135deg, #f59e0b, #facc15);
}

.dinner-preview {
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.impostor-preview {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    50% {
        transform: translateY(-15px) rotate(5deg) scale(1.05);
    }
}


.tool-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.tool-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tool-tags span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.btn-tool {
    display: block;
    text-align: center;
    padding: 0.9rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border-radius: 12px;
    font-weight: 600;
}

.tool-card:hover .btn-tool {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.tool-card-placeholder {
    border-style: dashed;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    min-height: 480px;
}

.placeholder-content {
    text-align: center;
}

.placeholder-content .plus {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* About Section */
.about-section {
    padding: 8rem 0;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01));
}

.about-content {
    max-width: 800px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* --- Added Portal Evolution Styles --- */

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-lang.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* Category Headers */
.category-title {
    font-size: 1.8rem;
    margin: 4rem 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--accent-primary);
}

.category-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* Info Icon */
.btn-info {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    z-index: 10;
}

.btn-info:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
}

/* Modal SEO Info */
.info-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.info-modal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.info-content h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.info-content p {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.info-content ul {
    list-style: none;
    padding: 0;
}

.info-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-content li strong {
    color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 1rem 0;
    }

    .container-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .lang-switcher {
        margin-left: 0;
    }
}