* {
    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, #0066FF 0%, #000080 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Seite */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #0000FF;
    margin-bottom: 10px;
    text-align: center;
}

.login-box h2 {
    color: #555;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 400;
}

.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: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0000FF;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #0066FF 0%, #000080 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 255, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-info p {
    margin: 5px 0;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f5f5f5;
}

.app-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    color: #0000FF;
    font-size: 1.5em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: #666;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.filetree-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filetree-header h2 {
    font-size: 1.2em;
    color: #333;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #f0f0f0;
}

.filetree {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.filetree-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    user-select: none;
}

.filetree-item:hover {
    background: #f0f0f0;
}

.filetree-item.active {
    background: #e6f0ff;
    color: #0000FF;
    font-weight: 500;
}

.filetree-item.directory {
    font-weight: 500;
}

.filetree-item.filetree-up {
    background: #f0f5ff;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
    font-weight: 500;
    color: #0000FF;
}

.filetree-item.filetree-up:hover {
    background: #e6f0ff;
}

.filetree-path {
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filetree-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.filetree-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filetree-children {
    margin-left: 20px;
    margin-top: 2px;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #999;
}

/* Viewer Area */
.viewer-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #e0e0e0;
}

.viewer-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: #999;
}

.placeholder-content svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-content h3 {
    margin-bottom: 10px;
    color: #666;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Upload Seite */
.upload-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.upload-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px;
}

.upload-box h2 {
    color: #0000FF;
    margin-bottom: 30px;
    text-align: center;
}

.upload-area {
    border: 3px dashed #ccc;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0000FF;
    background: #f0f5ff;
}

.upload-area.drag-over {
    border-color: #0000FF;
    background: #e6f0ff;
    transform: scale(1.02);
}

.upload-content svg {
    color: #0000FF;
    margin-bottom: 20px;
}

.upload-content h3 {
    color: #333;
    margin-bottom: 10px;
}

.upload-content p {
    color: #666;
    margin: 10px 0;
}

.upload-hint {
    font-size: 14px;
    color: #999;
    margin-top: 15px;
}

.file-list {
    margin: 30px 0;
}

.file-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.file-list-item:hover {
    background: #e9ecef;
}

.file-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-remove:hover {
    background: #c82333;
}

.upload-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.upload-progress {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066FF 0%, #000080 100%);
    transition: width 0.3s;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #0000FF;
}

.upload-messages {
    margin-top: 20px;
}

.upload-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.upload-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Scrollbar Styling */
.filetree::-webkit-scrollbar {
    width: 8px;
}

.filetree::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filetree::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.filetree::-webkit-scrollbar-thumb:hover {
    background: #555;
}
