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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

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

.login-box h1 {
    margin-bottom: 15px;
    color: #333;
}

.login-box p {
    color: #666;
    margin-bottom: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-input {
    font-size: 24px;
    padding: 12px 20px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 100%;
    font-family: monospace;
}

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

.btn-login {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-login:hover {
    background: #5a67d8;
}

.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-info p {
    margin: 5px 0;
    font-size: 14px;
}

.hint {
    color: #999;
    font-size: 12px !important;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    color: #333;
    font-size: 24px;
}

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

.user-info {
    color: #666;
    font-size: 14px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

/* Message */
.message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-link {
    text-decoration: none;
    color: #667eea;
}

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

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* Stats Bar */
.stats-bar {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 20px;
}

.stat-value {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 13px;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-create {
    background: #28a745;
    color: white;
}

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

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

.btn-back:hover {
    background: #5a6268;
}

/* Directories Grid */
.directories-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.directories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.directory-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.directory-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.directory-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.directory-icon {
    font-size: 32px;
}

.directory-name {
    flex: 1;
    font-weight: 500;
    word-break: break-all;
}

.dir-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.dir-link:hover {
    color: #667eea;
}

.directory-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.stat-mini .stat-icon {
    font-size: 14px;
}

.stat-mini .stat-value {
    font-size: 14px;
}

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

.btn-action-mini {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-copy {
    background: #17a2b8;
    color: white;
}

.btn-copy:hover {
    background: #138496;
}

.btn-move {
    background: #ffc107;
    color: #333;
}

.btn-move:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.no-directories {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

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

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.current-location {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-family: monospace;
}

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

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

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

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

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-submit {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #5a67d8;
}

/* Footer */
footer {
    margin-top: 30px;
    text-align: center;
    color: white;
    font-size: 12px;
    opacity: 0.8;
    padding: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .directories-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .login-box {
        padding: 20px;
        margin: 10px;
    }
    
    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .directory-actions {
        flex-direction: column;
    }
    
    .directory-stats {
        justify-content: space-between;
    }
}