* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container { max-width: 900px; width: 100%; margin-top: 40px; }
.hidden { display: none !important; }

/* HEADERS & TYPOGRAPHY */
header { text-align: center; margin-bottom: 30px; }

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle { color: #888; letter-spacing: 1px; }

/* GLASSMORPHISM PANELS */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

/* LOGIN SCREEN */
.login-box { max-width: 400px; margin: 0 auto; text-align: center; }
.login-box h2 { margin-bottom: 20px; color: #fff; }
.login-box form { display: flex; flex-direction: column; gap: 15px; }

/* INPUTS & SEARCH */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

input:focus { border-color: #667eea; }

.search-container { margin-bottom: 20px; }
#search-input {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

/* BUTTONS */
.gradient-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, opacity 0.2s;
}

.gradient-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.gradient-btn.small { padding: 8px 16px; font-size: 0.9rem; }

.text-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
}
.text-btn:hover { color: #fff; }

#admin-toolbar { margin-top: 15px; display: flex; justify-content: center; gap: 10px; }

/* FILE EXPLORER TABLE */
.file-explorer { width: 100%; overflow-x: auto; }
/* FILE EXPLORER TABLE */
.file-explorer { width: 100%; overflow-x: auto; }

/* Default Layout (Non-Admin) */
.header-row, .file-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 2fr 100px;
    padding: 10px;
    align-items: center;
}

.header-row {
    border-bottom: 2px solid rgba(255,255,255,0.1);
    font-weight: 600;
    color: #667eea;
}

.file-row {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.file-row:hover { background: rgba(255,255,255,0.05); }

/* Admin Layout (Adds space for the delete button) */
.admin-view .header-row, 
.admin-view .file-row {
    grid-template-columns: 3fr 1fr 1fr 2fr 50px 100px; /* Added 50px column for delete button */
}

/* Hide the delete column header/content by default */
.col-delete { display: none; text-align: center; }

/* Show the delete column only when admin-view is active */
.admin-view .col-delete { display: block; }

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.file-row:hover { background: rgba(255,255,255,0.05); }

.download-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}
.download-link:hover { color: #764ba2; }

/* MODAL */
.modal {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 100;
}
.modal-content { width: 350px; position: relative; background: #1a1a2e; }
.close-modal { position: absolute; top: 10px; right: 15px; cursor: pointer; font-size: 1.5rem; }

.error { color: #ff6b6b; margin-top: 10px; }

footer { margin-top: 50px; text-align: center; color: #666; font-size: 0.9rem; }
/* --- UPDATED LOGO & HEADER STYLES --- */

/* The container that aligns Logo and Title side-by-side */
.logo-header-row {
    display: flex;
    align-items: center;       /* Vertically centers them */
    justify-content: center;   /* Horizontally centers the whole block */
    gap: 15px;                 /* Space between logo and text */
    margin-bottom: 5px;
}

/* The Logo Image */
.site-logo.small-logo {
    height: 40px;              /* Make it smaller (adjust as needed) */
    width: auto;
    margin: 0;                 /* Remove the old centering margins */
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Hover Effect for Logo */
.site-logo.small-logo:hover {
    transform: scale(1.1);     /* Slight zoom on hover */
    opacity: 0.9;
}

/* Ensure the title stays tight with the logo */
h1 {
    margin-bottom: 0;          /* Remove bottom margin so it aligns nicely */
    font-size: 2.5rem;         /* Slightly adjusted size */
}

/* Fix for the Dashboard header layout */
#dashboard-screen header {
    display: flex;
    flex-direction: column;
    align-items: center;
}