* {
    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 Section */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    color: #667eea;
    text-align: center;
    font-size: 24px;
}

.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;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    width: 100%;
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

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

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

.btn-back {
    background: #6c757d;
    color: white;
}

.btn-back:hover:not(:disabled) {
    background: #5a6268;
}

.btn-back:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-download {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-download:hover {
    background: #218838;
}

/* Browser Section */
.browser-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.navigation {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-path {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.path-label {
    font-weight: 600;
    color: #555;
}

#current-path {
    color: #667eea;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 5px;
}

/* File List */
.file-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#file-table {
    width: 100%;
    border-collapse: collapse;
}

#file-table thead {
    background: #667eea;
    color: white;
}

#file-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

#file-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

#file-table tbody tr:hover {
    background-color: #f8f9fa;
}

#file-table tbody tr:last-child {
    border-bottom: none;
}

#file-table td {
    padding: 12px 15px;
}

.icon-col {
    width: 50px;
    text-align: center;
    font-size: 20px;
}

.name-col {
    min-width: 300px;
}

.name-col a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.name-col a:hover {
    text-decoration: underline;
}

.date-col {
    width: 200px;
    color: #666;
    font-size: 14px;
}

.action-col {
    width: 150px;
    text-align: center;
}

.directory-row {
    font-weight: 500;
}

.empty-message {
    text-align: center;
    padding: 40px !important;
    color: #999;
    font-style: italic;
}

/* Messages */
.error-message {
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

#error-message {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #dc3545;
}

.loading {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .browser-container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    .current-path {
        flex-direction: column;
        align-items: flex-start;
    }

    #current-path {
        width: 100%;
        word-break: break-all;
    }

    .date-col {
        display: none;
    }

    .name-col {
        min-width: auto;
    }

    #file-table {
        font-size: 14px;
    }

    #file-table th,
    #file-table td {
        padding: 10px;
    }
}
