* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #e8a4d4 0%, #d68abf 40%, #a34e8f 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: -1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
    opacity: 0.9;
}

.section {
    padding: 4rem 0;
    background-color: white;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
    position: relative;
}

.banner-img {
    width: 100%;
    display: block;
    border-radius: 12px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #d68abf 0%, #b05a9a 100%);
    margin: 0.5rem auto;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    text-decoration: none;
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 0 25px rgba(0,0,0,0.15);
}

.banner-img:hover {
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
    transform: scale(1.01);
}

.card h3 {
    margin-bottom: 1rem;
    color: #d68abf;
    font-weight: 600;
}

.card:hover h3 {
    color: #b05a9a;
}

.card p {
    color: #6c757d;
    line-height: 1.5;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 2rem 0;
        margin-bottom: 1rem;
    }

    .card {
        padding: 1rem;
    }
}

/* ===========================================
   Explorer Styles
   =========================================== */


.explorer-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.explorer-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.breadcrumb-item {
    color: #d68abf;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.breadcrumb-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #b05a9a;
}

.breadcrumb-item:last-child {
    color: #2c3e50;
    font-weight: 600;
    pointer-events: none;
}

.breadcrumb-separator {
    color: #adb5bd;
    font-weight: 300;
    user-select: none;
}

/* File List */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    border-bottom: 1px solid #f1f3f4;
}

.file-item:last-child {
    border-bottom: none;
}

.file-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    gap: 1rem;
}

.file-link:hover {
    background-color: #f8f9fa;
}

.file-item.is-directory .file-link:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

.file-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-weight: 500;
    word-break: break-word;
}

.file-item.is-directory .file-name {
    color: #d68abf;
}

.file-size {
    color: #6c757d;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Empty directory */
.empty-directory {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-directory p {
    font-size: 1.1rem;
}

.explorer-content {
    transition: opacity 0.2s ease;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Responsive adjustments for explorer */
@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 0.95rem;
    }

    .file-link {
        padding: 0.875rem 0.75rem;
    }

    .file-icon {
        font-size: 1.3rem;
    }

    .file-size {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 0.875rem;
        gap: 0.25rem;
    }

    .breadcrumb-item {
        padding: 0.2rem 0.35rem;
    }

    .file-link {
        padding: 0.75rem 0.5rem;
        gap: 0.75rem;
    }

    .file-icon {
        font-size: 1.2rem;
        width: 1.5rem;
    }
}

/* ===========================================
   File Embed Styles
   =========================================== */

.file-embed-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.file-embed-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-embed-header .file-size {
    color: #6c757d;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #d68abf 0%, #b05a9a 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-button:active {
    transform: translateY(0);
}

.file-embed-content {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.embed-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.embed-video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
}

.embed-audio {
    width: 100%;
    max-width: 500px;
}

.embed-text {
    width: 100%;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.embed-unsupported {
    color: #6c757d;
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 768px) {
    .file-embed-header {
        padding: 0.875rem 1rem;
    }

    .download-button {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .file-embed-content {
        padding: 1rem;
    }

    .embed-text {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .file-embed-header {
        padding: 0.75rem;
    }

    .download-button {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }

    .file-embed-content {
        padding: 0.75rem;
    }

    .embed-text {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}
