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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #1a1f2e;
    color: #e5e7eb;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 200px;
    background: #232936;
    border-right: 1px solid #2d3548;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid #2d3548;
}

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

.brand-icon {
    width: 28px;
    height: 28px;
    color: #fbbf24;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.2;
}

.user-section {
    padding: 16px;
    border-bottom: 1px solid #2d3548;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #3b4252;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #d946ef;
}

.user-avatar svg {
    width: 24px;
    height: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #2d3548;
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
}

.user-id {
    font-size: 13px;
    color: #e5e7eb;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.add-account-btn {
    width: 100%;
    padding: 10px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.add-account-btn:hover {
    background: #2563eb;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #2d3548;
    color: #e5e7eb;
}

.nav-item.active {
    background: #2d3548;
    color: #e5e7eb;
    border-left-color: #3b82f6;
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #2d3548;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.social-link:hover {
    color: #e5e7eb;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1f2e;
    overflow-y: auto;
}

.top-bar {
    padding: 16px 24px;
    border-bottom: 1px solid #2d3548;
    display: none;
}

.menu-toggle {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.breadcrumb {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2d3548;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-icon {
    width: 24px;
    height: 24px;
    color: #fbbf24;
}

.breadcrumb-item span {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.breadcrumb-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.dot {
    cursor: pointer;
}

.action-bar {
    padding: 16px 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #2d3548;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #2d3548;
    color: #e5e7eb;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #3b4252;
}

.share-btn {
    background: #10b981;
    color: white;
}

.share-btn:hover {
    background: #059669;
}

.file-list {
    flex: 1;
    padding: 24px;
}

.file-item {
    display: grid;
    grid-template-columns: 40px 40px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #232936;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.file-item:hover {
    background: #2d3548;
}

.file-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.file-icon {
    width: 40px;
    height: 40px;
    color: #fbbf24;
}

.file-icon svg {
    width: 100%;
    height: 100%;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.file-size {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 8px;
}

.file-date {
    font-size: 12px;
    color: #6b7280;
}

.file-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #374151;
    color: #9ca3af;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
    width: fit-content;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #2d3548;
    color: #e5e7eb;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.file-action-btn:hover {
    background: #3b4252;
}

.file-action-btn.primary {
    background: #10b981;
    color: white;
}

.file-action-btn.primary:hover {
    background: #059669;
}

.more-btn {
    padding: 8px;
}

.file-stats {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 13px;
}

.file-stats p {
    margin: 4px 0;
}

.footer {
    padding: 24px;
    border-top: 1px solid #2d3548;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #e5e7eb;
}

.footer-links span {
    color: #4b5563;
}

.footer-credit {
    color: #6b7280;
    font-size: 12px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #232936;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #2d3548;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #e5e7eb;
}

.form-container {
    padding: 32px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #2d3548;
}

.auth-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #e5e7eb;
}

.auth-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #fff3f3;
    border: 1px solid #ffd6d6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c41e3a;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.error-message::before {
    content: "⚠";
    font-size: 16px;
    flex-shrink: 0;
}

.form-container {
    width: 100%;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #3b4252;
    border-radius: 6px;
    background: #2d3548;
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
}

.social-btn:hover {
    background-color: #3b4252;
    border-color: #4b5563;
}

.social-btn:active {
    transform: scale(0.98);
}

.social-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.social-btn.loading svg {
    opacity: 0;
}

.social-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: #0061ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.apple-btn {
    color: #000;
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
    color: #6b7280;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #3b4252;
}

.divider span {
    position: relative;
    background: #232936;
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
}

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

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #3b4252;
    border-radius: 6px;
    font-size: 15px;
    color: #e5e7eb;
    background: #2d3548;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-group input::placeholder {
    color: #9ca3af;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.checkbox-group label {
    font-size: 14px;
    color: #e5e7eb;
    cursor: pointer;
}

.primary-btn {
    width: 100%;
    padding: 12px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.primary-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

.primary-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.primary-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.footer-links {
    text-align: center;
    margin-top: 24px;
}

.footer-links .link {
    font-size: 14px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -200px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s;
    }

    .sidebar.open {
        left: 0;
    }

    .top-bar {
        display: block;
    }

    .action-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .file-item {
        grid-template-columns: 30px 30px 1fr;
        gap: 12px;
    }

    .file-actions {
        grid-column: 1 / -1;
        margin-top: 8px;
        justify-content: flex-start;
    }

    .file-action-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .modal-content {
        margin: 10px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .form-container {
        padding: 20px;
    }
}
