html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.admin .admin-form input {
    background: #fff;
    color: #000;
}

body.admin .admin-form button {
    margin-top: 10px;
}

.page-container {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.folder {
    min-height: 100vh;
    overflow-x: hidden;
}

body.folder::before {
    content: "";
    position: fixed;
    inset: 0;

    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;

    z-index: -1;
}

/* Heading */
.page-container h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Admin Dashboard link */
.admin-link a {
    padding: 10px 15px;
    background: #fff;
    color: #000;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.6);
    transition: background 0.3s ease;
}

.admin-link a:hover {
    background: #000;
}

/* ===== Grid Layout for Folders ===== */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* ===== Media / Folder Card ===== */
.file {
    display: flex;
    flex-direction: column;
    background: rgba(73, 2, 2, 0.9);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-name {
    margin: 10px 0;
    color: #000;
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 1.2;
    word-break: break-word;
}


/* Thumbnails must stay inside cards */
.file img.thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.file.folder {
    background: rgba(90, 44, 196, 0.95);
}

.file.folder a::before {
    margin-right: 8px;
}

.file.folder a[href*="AdminPrivate"]::before {
    content: "🔒";
}

.file.folder a:not([href*="AdminPrivate"])::before {
    content: "📁";
}

.file.folder a {
    color: #000;
    /* change to whatever color you want */
    font-weight: bold;
    text-decoration: none;
}

.file.folder a:hover {
    color: #3498db;
    /* optional hover color */
}

.file:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}


/* Locked Folder Style */
.file.locked {
    background: rgba(255, 0, 0, 0.8);
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== Buttons and Links ===== */
.file-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: auto;
}

.file.music .thumbnail {
    height: 140px;
}

.file.music .thumbnail.placeholder {
    height: 140px;
}

/* Main Button Styles */
button,
.btn,
.view-btn,
.download-btn,
.admin-upload-btn,
.contact-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    color: rgb(77, 74, 74);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ===== Login Page ONLY ===== */

body.login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;

    background-image: url("/static/backgrounds/bg-login.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
}

/* Login card sizing ONLY */
body.login .page-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* ===== Login Contact Button ===== */
body.login .contact-section {
    margin-top: 20px;
    text-align: center;
}

body.login .contact-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 8px;
    background-color: #f39c12;
    color: #000;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.6);
    transition: all 0.3s ease;
}

body.login .contact-btn:hover {
    background-color: #f1c40f;
    transform: translateY(-2px);
}

/* PASSWORD RULES HINT */
.password-hint {
    font-size: 0.85em;
    color: #ccc;
    margin-top: 6px;
}

.password-hint ul {
    margin: 6px 0 0 18px;
}

.alert-banner {
    background: linear-gradient(90deg, #b30000, #ff1a1a);
    color: #fff;
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    animation: alertFadeIn 0.4s ease-in-out;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Login Form ===== */

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

/* Labels */
.admin-form label {
    text-align: left;
    font-weight: bold;
    font-size: 0.9rem;
    color: #efeef3;
}

/* Inputs */
.admin-form input {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.admin-form input:focus {
    box-shadow: 0 0 0 2px #3498db;
}

/* Login Button */
.login-btn {
    margin-top: 10px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background-color: #2980b9;
}

/* Login footer text */
.page-container p {
    margin-top: 20px;
    font-size: 0.95rem;
}

.page-container p a {
    color: #f1c40f;
    font-weight: bold;
    text-decoration: none;
}

.page-container p a:hover {
    text-decoration: underline;
}

/* Button Colors */
.view-btn {
    background-color: #3498db;
    /* Blue */
}

.download-btn {
    background-color: #2ecc71;
    /* Green */
}

.admin-upload-btn {
    background-color: #27ae60;
    /* Green */
}

.contact-btn {
    background-color: #f39c12;
    /* Yellow */
}

/* Button Hover Effects */
.view-btn:hover {
    background-color: #2980b9;
}

.download-btn:hover {
    background-color: #27ae60;
}

.admin-upload-btn:hover {
    background-color: #2ecc71;
}

.contact-btn:hover {
    background-color: #f1c40f;
}

.login-container form button {
    margin-top: 12px;
}

.login-links {
    margin-top: 16px;
    text-align: center;
}

.thumbnail.placeholder {
    width: 100%;
    height: 180px;
    background: #111;
    color: #aaa;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* ===== Global Header / Navigation ===== */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.security-badge {
    background: #b30000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
    margin-left: 12px;
}

.site-header .nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
}

.site-header a:hover {
    text-decoration: underline;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-form input {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.search-form button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}