/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Page Styles */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #667eea;
}

.header h2 {
    font-size: 1.2em;
    color: #666;
    font-weight: normal;
}

.form-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.info-text {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group .hint {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
    white-space: nowrap;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.help-links {
    margin-top: 20px;
    text-align: center;
}

.help-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
}

.help-links a:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

.footer .small {
    font-size: 0.8em;
    margin-top: 5px;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-size: 0.95em;
}

.user-info .btn {
    width: auto;
    padding: 8px 20px;
}

.dashboard-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
}

.upload-section, .files-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-section h2, .files-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.drop-zone {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.drop-zone.uploading {
    border-color: #ccc;
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.drop-zone.uploading:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.drop-zone.upload-disabled {
    cursor: not-allowed;
    border-color: #fcc;
    background: #fee;
}

.current-folder-indicator {
    position: absolute;
    top: 15px;
    left: 20px;
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    pointer-events: none;
}

.current-folder-indicator strong {
    font-weight: 700;
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.drop-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.or-text {
    color: #999;
    margin: 15px 0;
}

.file-input-label {
    pointer-events: all;
    width: auto;
    display: inline-block;
    padding: 12px 30px;
    margin: 10px 0;
}

.hint {
    color: #999;
    font-size: 0.9em;
    margin-top: 10px;
}

.upload-queue {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.upload-queue h3 {
    margin-bottom: 15px;
    color: #333;
}

.upload-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upload-item-name {
    font-weight: 500;
    color: #333;
}

.upload-item-status {
    font-size: 0.9em;
    color: #667eea;
}

.upload-item-status.success {
    color: #3c3;
}

.upload-item-status.error {
    color: #c33;
}

.progress-bar {
    height: 8px;
    background: #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

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

.files-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.95em;
    width: 200px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.storage-info {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.storage-info span {
    color: #666;
    font-size: 0.95em;
}

.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}

.spinner-large {
    font-size: 3em;
    animation: spin 2s linear infinite;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: #f5f5f5;
}

.files-table th {
    padding: 15px;
    text-align: left;
    color: #666;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.files-table tbody tr:hover {
    background: #f9f9f9;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.file-size, .file-date {
    color: #666;
    font-size: 0.9em;
}

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

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.2);
}

.empty-state, .error-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon, .error-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.empty-state p, .error-state p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.dashboard-footer {
    background: white;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
    border-top: 1px solid #e1e1e1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .files-header {
        flex-direction: column;
        align-items: stretch;
    }

    .files-actions {
        flex-direction: column;
    }

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

    .files-table {
        font-size: 0.9em;
    }

    .files-table th, .files-table td {
        padding: 10px;
    }
}

/* Folder Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
}

.modal-content input:focus {
    outline: none;
    border-color: #667eea;
}

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

.modal-actions .btn {
    flex: 1;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb-item {
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.breadcrumb-item:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 5px;
}

/* Folder Row Styles */
.folder-row {
    background: #f8f9ff;
}

.folder-row:hover {
    background: #f0f2ff !important;
}

.folder-row .file-name {
    color: #667eea;
    cursor: pointer;
    user-select: none;
}

.folder-row .file-name:hover {
    color: #764ba2;
}

/* Modal Large */
.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    margin-top: 0;
}

.upload-destination {
    background: #f0f2ff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #667eea;
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 20px;
}

.mb-2 {
    margin-bottom: 20px;
}
