* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
}

.desktop {
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.breadcrumb {
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.back-btn:hover:not(:disabled) {
    background: #45a049;
}

.back-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.file-explorer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.file-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: #4CAF50;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
    line-height: 1.3;
}

.file-type {
    font-size: 12px;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content.full-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #2a5298;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.action-btn, .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.action-btn:hover, .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.close-btn:hover {
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    background: #1a1a1a;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.pdf-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    gap: 10px;
    align-items: center;
    backdrop-filter: blur(10px);
}

.pdf-controls button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.pdf-controls button:hover {
    background: #45a049;
}

.pdf-controls span {
    color: white;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

#pdfCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

#imageViewer {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
}

.info-panel {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .file-icon {
        font-size: 40px;
    }
    
    body {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .files-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .file-item {
        padding: 15px 10px;
    }
    
    .file-icon {
        font-size: 36px;
    }
    
    .file-name {
        font-size: 12px;
    }
}