body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.pdf-container {
    width: 100%;
    height: 100vh;
    position: relative;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none; /* Hidden initially until we confirm internet connection */
}

.no-internet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    z-index: 1000;
}

.container {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.wifi-symbol {
    width: 100%;
    height: 100%;
    position: relative;
}

.wifi-circle {
    position: absolute;
    border: 4px solid #ccc;
    border-radius: 50%;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.wifi-circle:nth-child(1) {
    width: 20px;
    height: 20px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.wifi-circle:nth-child(2) {
    width: 40px;
    height: 40px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.2s;
}

.wifi-circle:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.4s;
}

.slash {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #ff3b30;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    animation: slashIn 0.5s ease-out forwards;
    opacity: 0;
}

h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 1rem;
}

p {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.retry-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    outline: none;
}

.retry-button:hover {
    background-color: #2980b9;
}

.retry-button:active {
    transform: scale(0.98);
}

.status {
    font-size: 14px;
    color: #999;
    margin-top: 1.5rem;
    height: 20px;
}

/* Loader styles from original code */
.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 999;
    flex-direction: column;
    display: none; /* Hidden initially */
}

.loader-text {
    font-size: 48px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.loader-text::after {
    content: 'MATH';
    position: absolute;
    top: 0;
    left: 0;
    color: #3498db;
    overflow: hidden;
    width: 0%;
    animation: fillText 10s linear forwards;
}

.topic-name {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    animation-delay: 0.2s;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: #3498db;
    position: absolute;
    animation: fillProgress 10s linear forwards;
}

#overlay {
    position: fixed;
    top: 11px;
    right: 11px;
    width: 43px;
    height: 67px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 1);
    z-index: 1000;
    display: none; /* Hidden initially */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slashIn {
    from { 
        opacity: 0;
        transform: translateY(-50%) rotate(45deg) scale(0);
    }
    to { 
        opacity: 1;
        transform: translateY(-50%) rotate(45deg) scale(1);
    }
}

@keyframes fillText {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    h1 {
        font-size: 24px;
    }
    
    p {
        font-size: 14px;
    }
}