/* Offline Screen Styles */
.offline-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: var(--bg-primary);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--text-primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.offline-screen.active {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.offline-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: contentPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contentPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.offline-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offline-icon {
    font-size: 50px;
    color: var(--accent-color);
    z-index: 2;
    transition: transform 0.3s ease;
}

.offline-icon.pulse {
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.offline-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: ringExpand 3s infinite linear;
}

.ring:nth-child(2) {
    animation-delay: 1s;
}

.ring:nth-child(3) {
    animation-delay: 2s;
}

@keyframes ringExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }

    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        border-width: 0px;
    }
}

.offline-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offline-message {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.offline-retry-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.offline-retry-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.offline-retry-btn i {
    font-size: 14px;
}

/* Background elements */
.offline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-cube {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    opacity: 0.05;
    border-radius: 12px;
    animation: floatAround 15s infinite linear;
}

.cube-1 {
    top: 15%;
    left: 10%;
    animation-duration: 20s;
}

.cube-2 {
    top: 70%;
    left: 80%;
    animation-duration: 18s;
    animation-delay: -5s;
}

.cube-3 {
    top: 40%;
    left: 50%;
    width: 40px;
    height: 40px;
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, 50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 80px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

[data-theme="dark"] .offline-screen {
    background: #1c1917;
    /* Matches --bg-primary in dark mode */
}

[data-theme="dark"] .offline-content {
    background: rgba(41, 37, 36, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}