:root {
    --plex-orange: #e5a93c;
    --plex-dark-orange: #cc8f25;
    --bg-dark: #0a0c0f;
    --card-bg: rgba(26, 30, 38, 0.65);
    --text-main: #ffffff;
    --text-muted: #989aa0;
    
    --status-green: #22c55e;
    --status-red: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 20% 20%, rgba(229, 169, 60, 0.03) 0px, transparent 50%), 
        radial-gradient(at 80% 80%, rgba(31, 38, 52, 0.4) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.container {
    max-width: 540px;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 48px 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 32px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge.online {
    color: var(--status-green);
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.status-badge.online .status-dot {
    background: var(--status-green);
    box-shadow: 0 0 10px var(--status-green);
}

.status-badge.offline {
    color: var(--status-red);
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
}

.status-badge.offline .status-dot {
    background: var(--status-red);
    box-shadow: 0 0 10px var(--status-red);
}

.plex-logo-container {
    margin-bottom: 12px;
}

.plex-logo {
    width: 150px;
    height: auto;
    display: inline-block;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 2px 10px rgba(229, 169, 60, 0.25));
}

.branding-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 0.25em;
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 300;
}

.action-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--plex-orange);
    color: #0a0c0f;
    box-shadow: 0 4px 12px rgba(229, 169, 60, 0.2);
}

.btn-primary:hover {
    background-color: var(--plex-dark-orange);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229, 169, 60, 0.3);
}

.btn-primary.offline-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(80%);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.footer-note {
    margin-top: 40px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
}

.network-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -120%);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 320px;
    max-width: 90vw;
    padding: 14px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.network-toast.online,
.network-toast.offline {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.network-toast .toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.network-toast.offline {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--status-red);
}

.network-toast.offline .toast-dot {
    background: var(--status-red);
    box-shadow: 0 0 8px var(--status-red), 0 0 18px rgba(239, 68, 68, 0.55);
}

.network-toast.online {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--status-green);
}

.network-toast.online .toast-dot {
    background: var(--status-green);
    box-shadow: 0 0 8px var(--status-green), 0 0 18px rgba(34, 197, 94, 0.55);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}