@import url('https://fonts.googleapis.com/css2?family=Lexend+Giga&display=swap');

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

body {
    font-family: 'Lexend Giga', sans-serif;
    background: url("background.gif") no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px) brightness(1.1);
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.back-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Lexend Giga', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Main content */
.main-content {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* File grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* File items */
.file-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.file-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.file-size {
    font-size: 0.8rem;
    color: #ccc;
}

.download-btn {
    background: rgba(0, 150, 255, 0.8);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: 'Lexend Giga', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.download-btn:hover {
    background: rgba(0, 150, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 150, 255, 0.3);
}

.download-btn:active {
    transform: translateY(0);
}

/* Loading and error states */
.loading, .error, .no-files {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #ccc;
    grid-column: 1 / -1;
}

.error {
    color: #ff6b6b;
}

/* Responsive design */
@media (max-width: 1200px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .file-grid {
        grid-template-columns: 1fr;
    }
    
    .file-item {
        padding: 1.25rem;
        min-height: auto;
    }
    
    .file-icon {
        font-size: 2rem;
    }
    
    .file-name {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
        align-items: center;
    }
    
    .file-info {
        text-align: center;
        width: 100%;
    }
    
    .file-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
}