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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-form {
    margin-bottom: 30px;
}

.file-input-wrapper {
    margin-bottom: 25px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    border: 3px dashed #667eea;
    border-radius: 15px;
    background-color: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background-color: #eef1ff;
    border-color: #764ba2;
}

.file-label svg {
    color: #667eea;
    margin-bottom: 15px;
}

.file-text {
    color: #666;
    font-size: 16px;
}

.file-name {
    display: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    word-break: break-all;
}

.btn-upload {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-upload:active {
    transform: translateY(0);
}

.info {
    background-color: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
}

.info p {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.info ul {
    list-style: none;
    padding-left: 0;
}

.info li {
    color: #666;
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.files-list {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.files-list h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 25px;
}

.files-grid {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.file-item:hover {
    background-color: #eef1ff;
    border-color: #667eea;
    transform: translateX(5px);
}

.file-icon {
    font-size: 32px;
    margin-right: 15px;
}

.file-info {
    flex: 1;
}

.file-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-meta {
    color: #999;
    font-size: 14px;
}

.btn-download {
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-download:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
}

/* File Manager */
.files-manager {
    margin-top: 30px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* File Cards */
.file-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.file-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.file-icon-large {
    font-size: 64px;
}

.file-card-body {
    padding: 20px;
}

.file-card .file-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.file-card .file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 13px;
}

.file-card .file-meta span {
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
}

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

.btn-action {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-view:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-action.btn-download {
    background-color: #667eea;
}

.btn-action.btn-download:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 18px;
}

@media (max-width: 768px) {
    .upload-box, .files-list {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
    }

    .file-item {
        flex-direction: column;
        text-align: center;
    }

    .file-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .btn-download {
        margin-top: 10px;
    }

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

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 35px;
    }

    .file-card .file-meta {
        flex-direction: column;
        gap: 5px;
    }
}
