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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ============ LOGIN SCREEN ============ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a3e 50%, #0f0f1a 100%);
    padding: 20px;
}

.login-card {
    background: rgba(22, 33, 62, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.login-card h1 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 35px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-error {
    color: #e94560;
    font-size: 0.85rem;
    margin-top: 15px;
    animation: shake 0.4s ease;
}

/* Login Wrapper */
.login-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Music Player */
.music-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(22, 33, 62, 0.8);
    border: 1px solid rgba(108, 99, 255, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.music-player.playing {
    border-color: rgba(108, 99, 255, 0.4);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-icon {
    font-size: 1.2rem;
    animation: none;
}

.music-player.playing .music-icon {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.music-title {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 500;
}

.btn-music-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(108, 99, 255, 0.15);
    color: #6c63ff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-music-toggle:hover {
    background: rgba(108, 99, 255, 0.3);
    transform: scale(1.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============ DASHBOARD ============ */
.dashboard {
    min-height: 100vh;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left h1 {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-upload-top {
    padding: 8px 18px;
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upload-top:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-new-folder {
    padding: 8px 16px;
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-new-folder:hover {
    background: rgba(108, 99, 255, 0.2);
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(233, 69, 96, 0.2);
}

/* Storage Bar */
.storage-bar {
    margin-bottom: 15px;
}

.storage-bar span {
    font-size: 0.8rem;
    color: #888;
    background: #16213e;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 0.9rem;
    color: #888;
    padding: 4px 8px;
    border-radius: 6px;
}

.breadcrumb-item.active {
    color: #ffffff;
    font-weight: 600;
}

.breadcrumb-item.clickable {
    cursor: pointer;
    transition: color 0.3s;
}

.breadcrumb-item.clickable:hover {
    color: #6c63ff;
}

.breadcrumb-separator {
    color: #555;
    font-size: 1rem;
}

/* Upload Panel */
.upload-panel {
    background: rgba(22, 33, 62, 0.9);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.upload-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-panel-header h3 {
    font-size: 1rem;
    color: #ffffff;
}

.btn-close-panel {
    width: 30px;
    height: 30px;
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-close-panel:hover {
    background: rgba(233, 69, 96, 0.2);
}

.upload-panel-body {
    padding: 20px;
}

.upload-folder-select {
    margin-bottom: 15px;
}

.upload-folder-select label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 8px;
}

.upload-folder-select select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.upload-folder-select select:focus {
    outline: none;
    border-color: #6c63ff;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: #16213e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    animation: slideDown 0.3s ease;
}

.modal-card h3 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.modal-card input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.modal-card input:focus {
    outline: none;
    border-color: #6c63ff;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-confirm {
    padding: 10px 20px;
    background: #6c63ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-confirm:hover {
    background: #5a52d5;
}

/* Folder Card */
.folder-card {
    cursor: pointer;
    border: 1px solid rgba(108, 99, 255, 0.08);
}

.folder-card:hover {
    border-color: rgba(108, 99, 255, 0.2);
    background: rgba(108, 99, 255, 0.05);
}

.btn-open {
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
}

.btn-open:hover {
    background: rgba(108, 99, 255, 0.25);
}

/* ============ UPLOAD SECTION ============ */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #2a2a4a;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(22, 33, 62, 0.5);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.upload-area p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 5px;
}

.upload-area span {
    color: #666;
    font-size: 0.85rem;
}

.btn-choose-file {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    background: #6c63ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-choose-file:hover {
    background: #5a52d5;
}

/* ============ FILES SECTION ============ */
.files-section {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 16px;
    padding: 25px;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.files-header h2 {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 600;
}

.search-box input {
    padding: 8px 14px;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.85rem;
    width: 200px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #6c63ff;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-card {
    background: rgba(26, 26, 46, 0.8);
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
    border: 1px solid transparent;
}

.file-card:hover {
    transform: translateX(3px);
    background: rgba(26, 26, 46, 1);
    border-color: rgba(108, 99, 255, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-details {
    min-width: 0;
}

.file-details h3 {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: #666;
    margin-top: 3px;
}

.file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 10px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-download {
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
}

.btn-download:hover {
    background: rgba(108, 99, 255, 0.25);
}

.btn-delete {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.btn-delete:hover {
    background: rgba(233, 69, 96, 0.25);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #555;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 0.9rem;
}

/* Upload Card */
.upload-card {
    background: rgba(22, 33, 62, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.upload-card h3 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.folder-create-row {
    display: flex;
    gap: 10px;
}

.folder-create-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.folder-create-row input:focus {
    outline: none;
    border-color: #6c63ff;
}

.folder-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.folder-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.folder-message.error {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.upload-status {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

/* Back Button */
.btn-back {
    padding: 8px 18px;
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(108, 99, 255, 0.2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .login-card {
        padding: 40px 25px;
    }

    .dashboard {
        padding: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .upload-area {
        padding: 25px;
    }

    .files-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .search-box input {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .file-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-actions {
        margin-left: 0;
        align-self: flex-end;
    }

    .modal-card {
        padding: 25px 20px;
    }
}
