:root {
    --primary-color: #f44336;
    --secondary-color: #ff9800;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --bg-color: #f9f9f9;
    --card-bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --footer-height: 60px;
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --primary-color: #4d8fff;
    --secondary-color: #9d66ff;
    --accent-color: #ff4081;
    --bg-color: #1a1a1a;
    --card-bg-color: #2d2d2d;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

:root {
    --primary-color: #f44336;
    --secondary-color: #ff9800;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --bg-color: #f9f9f9;
    --card-bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --footer-height: 60px;
    --transition-speed: 0.3s;
    --border-radius: 10px;
}

.dark-mode {
    --bg-color: #1a1a1a;
    --card-bg-color: #2d2d2d;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

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

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.join-game-btn {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.join-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: linear-gradient(45deg, #4d8fff, #9d66ff);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    z-index: 0;
}

.theme-toggle i {
    color: white;
    font-size: 14px;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.toggle-ball {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    left: 3px;
    transition: transform var(--transition-speed);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.dark-mode .theme-toggle {
    background: linear-gradient(45deg, #2d3748, #1a202c);
}

.dark-mode .toggle-ball {
    transform: translateX(30px);
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 30px 0;
}

.document-section {
    margin-bottom: 30px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    font-size: 1.2rem;
}

.document-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.document-card {
    background: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.document-info {
    padding: 20px;
}

.document-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-info p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
}

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.document-author {
    margin-top: 10px;
    font-style: italic;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-author small {
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.document-card:hover .document-author small {
    opacity: 1;
}

.view-btn, .download-btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.view-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    flex: 1;
}

.view-btn:hover {
    background-color: var(--secondary-color);
}

.download-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s;
}

.download-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
}

.mobile-only {
    display: none;
}

/* PDF Embed Styles */
.pdf-embed {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: var(--card-bg-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    overflow: hidden;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--border-color);
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mobile-pdf-controls {
    display: none;
    margin-top: 10px;
    width: 100%;
}

.mobile-pdf-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--success-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.mobile-pdf-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
}

.mobile-pdf-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mobile-pdf-message i {
    font-size: 2rem;
    color: var(--success-color);
}

.mobile-pdf-message p {
    margin: 0;
    line-height: 1.5;
}

.quick-access-menu {
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quick-access-btn {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.quick-access-btn:hover {
    background-color: var(--secondary-color);
}

.close-btn {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.pdf-container {
    flex: 1;
    overflow: hidden;
}

#pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: white;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
footer {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    height: var(--footer-height);
    position: relative;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.watermark {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.8rem;
    opacity: 0.5;
    color: var(--text-light);
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .document-cards {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .pdf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pdf-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .quick-access-menu {
        flex-wrap: wrap;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    margin-bottom: 30px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), var(--secondary-color), transparent);
}

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

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(131, 56, 236, 0.2);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-white);
    opacity: 0.8;
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
}

.sidebar-nav li.active a {
    background-color: var(--sidebar-active);
    border-left: 3px solid var(--primary-color);
    opacity: 1;
}

.sidebar-nav a:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.user-info i {
    font-size: 1.5rem;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    cursor: pointer;
}

.theme-toggle i {
    color: var(--text-white);
    font-size: 12px;
    z-index: 1;
}

.toggle-ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 3px;
    transition: transform var(--transition-speed);
}

.dark-mode .toggle-ball {
    transform: translateX(24px);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

.main-header {
    padding: 20px 30px;
    background-color: var(--card-bg-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-title h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.header-title p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(74, 108, 247, 0.2);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 108, 247, 0.3);
}

.btn-view {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    flex: 1;
    box-shadow: 0 4px 10px rgba(74, 108, 247, 0.2);
}

.btn-view:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 108, 247, 0.3);
}

.btn-download {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px;
    width: 42px;
    height: 42px;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-quick {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-quick:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.btn-icon:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Documents Grid */
.documents-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.document-card {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all var(--transition-speed);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.document-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.document-card:hover::before {
    opacity: 1;
}

.primary-card .document-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.warning-card .document-icon {
    background: linear-gradient(135deg, var(--warning-color), #ff7f50);
}

.document-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0 5px 25px;
}

.document-icon i {
    font-size: 1.5rem;
    color: white;
}

.document-info {
    padding: 20px 25px 25px;
    flex: 1;
}

.document-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.document-info p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.document-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-meta i {
    color: var(--primary-color);
}

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* PDF Viewer */
.pdf-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.pdf-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-title i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.pdf-title h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.pdf-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quick-access-menu {
    display: flex;
    gap: 10px;
    font-size: 1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--danger-color);
    background-color: rgba(244, 67, 54, 0.1);
    transform: rotate(90deg);
}

.pdf-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 10px;
    background-color: #f0f0f0;
}

#pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer Styles */
footer {
    margin-top: auto;
    padding: 25px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    height: var(--footer-height);
    background-color: var(--card-bg-color);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), var(--secondary-color), transparent);
}

footer p {
    font-size: 0.95rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

footer p::before {
    content: '\f1f9'; /* Copyright icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--primary-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
    border-radius: 2px;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover::after {
    width: 100%;
}

.watermark {
    position: fixed;
    bottom: 15px;
    right: 15px;
    font-size: 0.8rem;
    opacity: 0.15;
    color: var(--text-color);
    pointer-events: none;
    font-style: italic;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .pdf-embed {
        width: 90%;
        left: 5%;
    }
}

@media (max-width: 900px) {
    .document-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .pdf-embed {
        width: 95%;
        left: 2.5%;
        height: 85%;
        top: 7.5%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .mobile-only {
        display: flex;
    }
    
    .view-btn {
        display: none;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .join-game-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .theme-toggle {
        width: 50px;
        height: 26px;
    }
    
    .toggle-ball {
        width: 20px;
        height: 20px;
    }
    
    .dark-mode .toggle-ball {
        transform: translateX(24px);
    }
    
    .quick-access-menu {
        flex-wrap: wrap;
    }
    
    .quick-access-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .document-section > p {
        font-size: 0.95rem;
    }
    
    .document-info h3 {
        font-size: 1.2rem;
    }
    
    .pdf-header {
        padding: 12px 15px;
    }
    
    #current-document-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .document-cards {
        grid-template-columns: 1fr;
    }
    
    .document-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .pdf-embed {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        border-radius: 0;
    }
    
    .pdf-header {
        border-radius: 0;
    }
    
    .mobile-pdf-controls {
        display: block;
        width: 100%;
        margin-top: 10px;
    }
    
    .mobile-pdf-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 15px;
        height: auto;
        padding: 15px 0 20px 0;
    }
    
    .logo-container {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-toggle {
        margin-left: auto;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-btn {
        width: 100%;
    }
    
    .pdf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pdf-header h3 {
        font-size: 1.1rem;
        width: calc(100% - 40px);
    }
    
    .pdf-controls {
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }
    
    .quick-access-menu {
        width: 100%;
        justify-content: space-between;
    }
    
    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    footer {
        padding: 15px 0;
    }
    
    footer p {
        flex-direction: column;
        gap: 5px;
        font-size: 0.8rem;
    }
}

/* Mobile-specific enhancements */
@media (max-width: 380px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .join-game-btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .theme-toggle {
        width: 45px;
        height: 24px;
    }
    
    .toggle-ball {
        width: 18px;
        height: 18px;
    }
    
    .dark-mode .toggle-ball {
        transform: translateX(21px);
    }
    
    .document-info h3 {
        font-size: 1.1rem;
    }
    
    .document-info p {
        font-size: 0.9rem;
    }
    
    .quick-access-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .view-btn, .join-game-btn, .quick-access-btn {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .close-btn {
        width: 44px;
        height: 44px;
    }
}
