/* Global Design Tokens */
:root {
    --primary: #be163d;
    /* Deep ruby for perfect AAA contrast */
    --accent: #FFDD00;
    --bg: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #cccccc;
    --success: #00f2ea;
}

html {
    scroll-behavior: smooth;
}

/* Custom Selection Color */
::selection {
    background: var(--primary);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

::-moz-selection {
    background: var(--primary);
    color: #ffffff;
}

/* Force text visibility on selection for gradient text */
h1::selection,
h2::selection,
h3::selection {
    -webkit-text-fill-color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Effects */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(254, 44, 85, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.1) 0%, transparent 40%);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

/* Base Layout & Typography */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px;
    animation: fadeInPage 1s ease-out;
}

header {
    text-align: center;
    margin-bottom: 80px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff 50%, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.profile-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--border);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
    border: 1px solid var(--border);
}

.tagline,
.contact-subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation System */
.main-nav {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 5000;
    animation: fadeInPage 1s ease-out;
}

.nav-container-new {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    padding-left: 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.nav-container-new a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 14px;
    transition: 0.3s ease;
    opacity: 0.7;
}

.nav-container-new a:hover,
.nav-container-new a.active {
    opacity: 1;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Language Selector */
.lang-selector {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s ease;
    opacity: 0.6;
    font-size: 13px;
    /* Slightly larger for visibility */
    font-weight: 800;
}

.lang-btn.active {
    opacity: 1;
    background: var(--primary);
    transform: scale(1.05);
    /* Use scale instead of box-shadow for performance */
}

/* Animations (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* App Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
    align-items: start;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(254, 44, 85, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #1a1a1e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 32px;
    border: 1px solid var(--border);
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid rgba(0, 242, 234, 0.2);
    color: var(--success);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Dropdown System */
.dropdown {
    position: relative;
    width: 100%;
    margin-top: auto;
}

.dropdown-trigger {
    background: var(--primary);
    border: none;
    padding: 14px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
    box-shadow: 0 8px 20px rgba(254, 44, 85, 0.3);
}

.dropdown-trigger svg {
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-trigger svg {
    transform: rotate(180deg);
}

.dropdown-content {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: -10px;
    padding-top: 15px;
    transform: translateY(-10px);
}

.dropdown.active .dropdown-content {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding-bottom: 10px;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-dim);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    border-radius: 8px;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: rgba(254, 44, 85, 0.1);
    color: var(--primary);
}

.browser-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Contact Specifics */
.contact-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 60px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: rgba(254, 44, 85, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-icon-big {
    width: 80px;
    height: 80px;
    background: rgba(254, 44, 85, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: 0.3s;
}

.contact-card:hover .card-icon-big {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-card span {
    color: var(--text-dim);
    font-size: 1rem;
}

.copy-email-btn {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.copy-email-btn:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

/* Support Card Special Hover */
.support-card-fix:hover {
    border-color: var(--accent) !important;
}

.support-card-fix:hover .card-icon-big {
    background: var(--accent) !important;
    color: #000 !important;
}


/* Policy & Specific Containers */
.policy-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 60px;
    margin-top: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.header-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.header-section h1 {
    font-size: 3rem;
    margin-bottom: 12px;
}

.policy-list {
    margin-left: 20px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.last-updated {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-box {
    background: rgba(0, 242, 234, 0.05);
    border: 1px solid rgba(0, 242, 234, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
}

.summary-box h3 {
    color: var(--success);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-box li {
    position: relative;
    padding-left: 25px;
    color: #d1d1d6;
    margin-bottom: 10px;
    list-style: none;
}

.summary-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.policy-box h2 {
    font-size: 1.8rem;
    margin-top: 48px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.policy-box h2 span:first-child {
    color: var(--primary);
    font-size: 1.2rem;
    font-family: monospace;
    background: rgba(254, 44, 85, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
}

.policy-box p {
    color: var(--text-dim);
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.permission-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.permission-card strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.back-link:hover {
    color: #fff;
    transform: translateX(-5px);
}

/* Support CTA Section */
.support-cta {
    background: linear-gradient(135deg, rgba(255, 221, 0, 0.05) 0%, rgba(255, 221, 0, 0) 100%);
    border: 1px solid rgba(255, 221, 0, 0.2);
    border-radius: 32px;
    padding: 60px;
    text-align: center;
}

.btn-support {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    width: fit-content;
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
}

/* Global Footer */
footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    opacity: 0;
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10001;
    /* Extremely high priority */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger {
    width: 22px;
    height: 2px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.menu-btn.active .hamburger {
    background: transparent;
}

.menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-btn.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Scroll Indicators & Misc */
.browser-current-badge {
    margin-left: auto;
    font-size: 8px;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    animation: pulse-mini 2s infinite;
}

@keyframes pulse-mini {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .menu-btn {
        display: flex !important;
    }

    h1 {
        font-size: 2.8rem;
    }

    .container {
        padding: 40px 16px;
        padding-top: 140px;
    }

    .policy-box {
        padding: 40px 24px;
    }

    .grid,
    .contact-grid-modern {
        grid-template-columns: 1fr;
    }

    .main-nav {
        position: static;
        /* Let children handle their own fixed positioning */
    }

    .menu-btn {
        display: flex !important;
        position: fixed;
        top: 25px;
        right: 25px;
    }

    .nav-container-new {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #0a0a0c;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 0;
        border: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(1.1);
        z-index: 9000;
        /* Lower than menu-btn */
        margin: 0;
        padding: 0;
        transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    }

    .nav-container-new.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: scale(1);
    }

    .nav-container-new a {
        font-size: 2rem;
        padding: 20px;
        opacity: 1;
    }
}