:root {
    --bg-color: #0a0a0f;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent-red: #ff2d55;
    --accent-blue: #0a84ff;
    --accent-green: #30d158;
    --accent-purple: #bf5af2;
    --accent-orange: #ff9f0a;
    --accent-teal: #64d2ff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --primary-color: #ff2d55;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Liquid Glass Background */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-glow::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 45, 85, 0.4) 0%, transparent 60%);
    top: -300px;
    left: -200px;
    animation: liquidMove1 20s ease-in-out infinite;
    filter: blur(80px);
}

.background-glow::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(10, 132, 255, 0.35) 0%, transparent 60%);
    bottom: -200px;
    right: -100px;
    animation: liquidMove2 18s ease-in-out infinite;
    filter: blur(80px);
}

@keyframes liquidMove1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(100px, 50px) scale(1.1);
    }

    50% {
        transform: translate(50px, 100px) scale(0.95);
    }

    75% {
        transform: translate(-50px, 50px) scale(1.05);
    }
}

@keyframes liquidMove2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-80px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-40px, -80px) scale(0.9);
    }

    75% {
        transform: translate(40px, -40px) scale(1.05);
    }
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.015;
    pointer-events: none;
    background-image: 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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 50px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles - Liquid Glass */
.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 1s ease-out;
    position: relative;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 16px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-red), #ff6b8a);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow:
        0 8px 32px rgba(255, 45, 85, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(255, 45, 85, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 12px 40px rgba(255, 45, 85, 0.5);
    }
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: white;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.1);
}

.logo-text span {
    background: linear-gradient(135deg, var(--accent-red), #ff6b8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.header-controls {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
}

.admin-link {
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.admin-link:hover {
    color: var(--accent-red);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: scale(1.05);
}

/* VPN Status Styles */
.vpn-status-container {
    display: flex;
    align-items: center;
}

.vpn-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.vpn-badge.connected {
    background: rgba(48, 209, 88, 0.1);
    color: var(--accent-green);
    border-color: rgba(48, 209, 88, 0.2);
    box-shadow: 0 0 15px rgba(48, 209, 88, 0.1);
}

.vpn-badge.disconnected {
    background: rgba(255, 45, 85, 0.1);
    color: var(--accent-red);
    border-color: rgba(255, 45, 85, 0.2);
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.1);
}

.vpn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.vpn-badge.connected .vpn-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse-green 2s infinite;
}

.vpn-badge.disconnected .vpn-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: pulse-red 2s infinite;
}

.btn-connect-vpn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-red), #ff6b8a);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.3);
    transition: var(--transition);
}

.btn-connect-vpn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 45, 85, 0.4);
    filter: brightness(1.1);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(48, 209, 88, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(48, 209, 88, 0);
    }
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 45, 85, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0);
    }
}

/* Portal Grid - Liquid Glass Cards */
.portal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    flex: 1;
}

@media (min-width: 900px) {
    .portal-grid {
        gap: 40px;
    }
}

/* Liquid Glass Card */
.env-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out both;
    position: relative;
    overflow: hidden;
}

/* Glass reflection effect */
.env-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 24px 24px 0 0;
}

/* Inner glow on hover */
.env-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

#staging::after {
    background: radial-gradient(ellipse at center, rgba(10, 132, 255, 0.1) 0%, transparent 70%);
}

#production::after {
    background: radial-gradient(ellipse at center, rgba(255, 45, 85, 0.1) 0%, transparent 70%);
}

.env-card:hover::after {
    opacity: 1;
}

.env-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

#staging {
    animation-delay: 0.1s;
}

#production {
    animation-delay: 0.2s;
}

.env-header {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

/* Glass Pills/Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.staging-badge {
    background: rgba(10, 132, 255, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(10, 132, 255, 0.25);
}

.production-badge {
    background: rgba(255, 45, 85, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 45, 85, 0.25);
}

.env-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* App Links - Liquid Glass Items */
.app-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Shine effect on hover */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: 0.6s ease;
}

.app-card:hover::before {
    left: 120%;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Glass App Icons */
.app-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Glass shine on icon */
.app-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

.app-card:hover .app-icon {
    transform: scale(1.08);
}

.app-icon svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Dynamic styles are handled via script.js for icons */
.app-info {
    flex-grow: 1;
}

.app-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.app-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.external-icon {
    opacity: 0.2;
    transition: var(--transition);
    color: var(--text-secondary);
}

.app-card:hover .external-icon {
    opacity: 0.8;
    color: var(--text-primary);
    transform: translate(2px, -2px);
}

.external-icon svg {
    width: 18px;
    height: 18px;
}

/* Footer - Liquid Glass */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.footer-admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.footer-admin-link:hover {
    color: var(--accent-red);
    background: rgba(255, 45, 85, 0.1);
    border-color: rgba(255, 45, 85, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .logo-text {
        font-size: 2rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .logo-icon svg {
        width: 24px;
        height: 24px;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .env-card {
        padding: 24px;
        border-radius: 20px;
    }

    .env-header h2 {
        font-size: 1.35rem;
    }

    .app-icon {
        width: 42px;
        height: 42px;
    }

    .admin-link {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-left: auto;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Selection */
::selection {
    background: rgba(255, 45, 85, 0.3);
    color: white;
}