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

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.92);
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.9rem 0;
    gap: 1rem;
}
.logo-area h1 {
    font-size: 1.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.logo-area .test-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #3b82f6;
    background: #eef2ff;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
}
.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}
.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #334155;
    padding: 0.5rem;
    border-radius: 40px;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.btn-outline {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #1e293b;
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.btn-primary {
    background: #3b82f6;
    border: none;
    padding: 0.5rem 1.4rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.storage-bar {
    background: white;
    border-radius: 20px;
    padding: 0.8rem 1.5rem;
    margin: 1.5rem 2rem 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eef2ff;
}
.stats-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}
.progress-container {
    flex: 1;
    max-width: 300px;
    background: #e2e8f0;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}
.progress-fill {
    width: 38%;
    height: 100%;
    background: #3b82f6;
    border-radius: 20px;
}

.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 2rem;
    align-items: center;
}
.breadcrumb span:first-child {
    font-weight: 600;
    color: #0f172a;
}
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
}
.file-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem 1rem 1rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #eef2ff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.file-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 20px -12px rgba(0,0,0,0.1);
}
.file-icon {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: #3b82f6;
}
.file-icon.folder {
    color: #f59e0b;
}
.file-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-meta {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}
.upload-area {
    margin-top: 2rem;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: #fefce8;
    padding: 1.2rem;
    text-align: center;
    color: #3b82f6;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.upload-area:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
.modal {
    background: white;
    width: 90%;
    max-width: 460px;
    border-radius: 32px;
    padding: 1.8rem 1.8rem 2rem;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.3);
    transform: scale(0.96);
    transition: transform 0.2s;
    position: relative;
}
.modal-overlay.active .modal {
    transform: scale(1);
}
.modal h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.modal p.sub {
    color: #475569;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}
.input-group {
    margin-bottom: 1.2rem;
}
.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #334155;
}
.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: 0.2s;
    outline: none;
    font-family: inherit;
}
.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.7rem;
    border-radius: 16px;
    font-size: 0.8rem;
    margin: 1rem 0 0.8rem;
    text-align: center;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1.5rem;
}
.modal-footer button {
    padding: 0.6rem 1.3rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}
.btn-cancel {
    background: #f1f5f9;
    color: #1e293b;
}
.btn-submit {
    background: #3b82f6;
    color: white;
}
.switch-auth {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
}
.switch-auth a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.close-modal {
    position: absolute;
    right: 1.2rem;
    top: 1rem;
    font-size: 1.4rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #64748b;
}
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.7rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}
@media (max-width: 640px) {
    .header-container { flex-direction: column; align-items: stretch; }
    .header-actions { justify-content: flex-end; }
    .storage-bar { flex-direction: column; align-items: flex-start; margin: 1rem; }
    .main-content { padding: 0 1rem; }
    .files-grid { gap: 1rem; }
}
