﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

h1 {
    color: #2c3e50;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
}

section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fafafa;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

    .btn-primary:hover {
        background-color: #2980b9;
    }

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

    .btn-secondary:hover {
        background-color: #7f8c8d;
    }

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

    .btn-danger:hover {
        background-color: #c0392b;
    }

.files-list {
    margin-top: 15px;
}

/* File expiration styles */
.file-info {
    flex: 1;
}

.file-details {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 14px;
}

.file-expiry {
    color: #27ae60;
    font-weight: 500;
}

.expiry-warning {
    color: #e74c3c;
    font-weight: bold;
}

.file-upload-time {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 2px;
}

.files-section h2 small {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: normal;
}

/* Enhanced file item layout */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .file-item:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transform: translateY(-1px);
    }

.file-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

.file-size {
    color: #7f8c8d;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* Message styles for hash display */
.message {
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 5px;
    display: none;
    line-height: 1.5;
}

    .message.success {
        background-color: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .message.error {
        background-color: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    .message.info {
        background-color: #cce7ff;
        color: #004085;
        border: 1px solid #b3d7ff;
    }

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.logout-form {
    margin: 0;
}

.upload-section {
    background: #e8f4fd;
}

.files-section {
    background: #f0f8f0;
}

/* Hash-related styles */
.file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.file-hash {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 12px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    margin: 8px 0;
    border: 1px solid #e9ecef;
    word-break: break-all;
    line-height: 1.4;
}

.hash-value {
    color: #495057;
    user-select: all;
}

.file-hash strong {
    color: #343a40;
}

.btn-outline {
    background: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 4px 8px;
    font-size: 12px;
}

    .btn-outline:hover {
        background: #6c757d;
        color: white;
    }

.btn-info {
    background-color: #17a2b8;
    color: white;
}

    .btn-info:hover {
        background-color: #138496;
    }

/* Enhanced file item for hash display */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.file-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.file-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 15px;
}

/* Hash copy feedback */
.hash-copied {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    transition: all 0.3s ease;
}

@media (max-width: 600px) {
    .file-item {
        flex-direction: column;
    }

    .file-actions {
        flex-direction: row;
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: flex-end;
    }

    .file-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .file-hash {
        font-size: 11px;
    }
}

/* Drag and Drop Styles */
.drop-zone {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    margin-bottom: 20px;
}

.drop-zone--over {
    border-color: #2980b9;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none; /* Allow click through to file input */
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.drop-zone-text {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.drop-zone-subtext {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.drop-zone .btn {
    pointer-events: all; /* Allow button clicks */
}

/* File List Preview */
.file-list-preview {
    margin-bottom: 20px;
}

    .file-list-preview h3 {
        color: #34495e;
        margin-bottom: 10px;
        font-size: 16px;
    }

.file-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

    .file-preview-item:hover {
        background-color: #f8f9fa;
    }

.file-preview-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.file-preview-size {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 15px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.upload-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

    .upload-btn:disabled {
        background-color: #bdc3c7;
        cursor: not-allowed;
    }

    .upload-btn:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

/* Progress bar for future enhancement */
.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #ecf0f1;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
}

/* Responsive design for file preview */
@media (max-width: 600px) {
    .file-preview-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .file-preview-size {
        margin: 0;
    }

    .drop-zone {
        padding: 30px 15px;
    }

    .drop-zone-text {
        font-size: 16px;
    }
}

/* Animation for file addition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-preview-item {
    animation: fadeIn 0.3s ease;
}