:root {
    --bg-color: #f0f0f3;
    --text-color: #2d2d2d;
    --shadow-light: #ffffff;
    --shadow-dark: #d1d9e6;
    --accent: #2d2d2d;
    --error: #e74c3c;
    --border-radius: 20px;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f3;
    --shadow-light: #242424;
    --shadow-dark: #101010;
    --accent: #f0f0f3;
}

@font-face {
    font-family: 'Bitcount';
    src: url('../fonts/bitcount.woff2') format('woff2'),
         url('../fonts/bitcount.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bitcount Grid Double';
    src: url('../fonts/bitcount-grid-double.woff2') format('woff2'),
         url('../fonts/bitcount-grid-double.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Bitcount Grid Double', monospace, sans-serif;
}

h1, h2, h3, .brand {
    font-family: "BJ Cree", serif;
    font-weight: 700;
    letter-spacing: 2px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0; 
    animation: fadeIn 0.8s ease forwards;
    transition: background-color 0.4s ease, color 0.4s ease;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 0.5s ease forwards !important;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

.neu-box {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 9px 9px 16px var(--shadow-dark), 
               -9px -9px 16px var(--shadow-light);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.neu-button {
    background-color: var(--bg-color);
    color: var(--accent);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 6px 6px 10px var(--shadow-dark), 
               -6px -6px 10px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.neu-button:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
    transform: scale(0.97); 
}

.neu-button-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
}

.neu-button-danger {
    color: var(--error);
}

.neu-input {
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
    outline: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.neu-input:focus {
    box-shadow: inset 6px 6px 12px var(--shadow-dark), 
                inset -6px -6px 12px var(--shadow-light);
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.neu-select {
    appearance: none;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: none;
    padding: 8px 30px 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    box-shadow: 6px 6px 10px var(--shadow-dark), 
               -6px -6px 10px var(--shadow-light);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.file-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.6s ease forwards;
    position: relative;
}

.file-thumbnail {
    width: 140px;
    height: 140px;
    border-radius: var(--border-radius);
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 4px 4px 8px var(--shadow-dark), 
               -4px -4px 8px var(--shadow-light);
}

.file-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bg-color);
    box-shadow: 4px 4px 8px var(--shadow-dark), 
               -4px -4px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: var(--accent);
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.file-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
    width: 100%;
}

.msg {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.msg.show { opacity: 1; }
.msg.error { color: var(--error); }

@media (max-width: 600px) {
    .upload-actions { flex-direction: column; }
    .neu-button, .neu-select { width: 100%; }
}
