* {
    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;
    color: #333;
}

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

header {
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    text-align: center;
    flex: 1;
}

.auth-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.logout-btn {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.5);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #667eea;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: #555;
}

.upload-area p {
    color: #888;
    margin-bottom: 20px;
}

#fileInput {
    display: none;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.progress-section {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #666;
    font-weight: bold;
}

.files-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.file-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: #667eea;
}

.file-details h4 {
    margin-bottom: 5px;
    color: #333;
}

.file-meta {
    color: #666;
    font-size: 0.9rem;
}

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

.download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.copy-link-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-link-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.report-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.delete-btn {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #5a2d91;
    transform: translateY(-1px);
}

.download-count {
    background: #6c757d;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.virus-status {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transform: translateX(300px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-modal.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.report-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

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

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

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

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

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

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

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-required {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
}

.auth-message {
    color: #666;
}

.auth-message i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.auth-message h3 {
    margin-bottom: 15px;
    color: #333;
}

.auth-message p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-btn,
.register-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn:hover,
.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.register-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.register-btn:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
}

.auth-modal .modal-content {
    background: white;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.auth-modal.show .modal-content {
    transform: translateY(0);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.toggle-auth {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.toggle-auth a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.toggle-auth a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .auth-section {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    main {
        padding: 20px;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .login-btn,
    .register-btn {
        width: 200px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cancel-btn,
    .submit-btn {
        width: 100%;
    }
}

/* Download page (file.php) */
/* Убираем фон/скругления/тень у main только на странице скачивания */
body.download-page main {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
 .file-page {
    max-width: 1040px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}

.breadcrumb {
    margin-bottom: 20px;
    color: #fff;
}
.breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}
.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.file-hero {
    background: linear-gradient(135deg, rgba(102,126,234,0.95), rgba(118,75,162,0.95));
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.file-hero::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.25), rgba(255,255,255,0) 60%);
    border-radius: 50%;
}
.file-icon-large {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 12px;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.25));
}
.file-hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.file-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 26px 0 6px 0;
}
.info-item {
    background: #f8f9ff;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eef0ff;
}
.info-label {
    font-size: 0.85rem;
    color: #6c6f93;
    margin-bottom: 6px;
}
.info-value {
    font-weight: 700;
    color: #2b2d42;
}

.security-note {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 22px 0 8px 0;
    color: #155724;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-section {
    text-align: center;
    margin: 28px 0 6px 0;
}
.download-btn-large {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 1.15rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(32, 201, 151, 0.25);
}
.download-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(32, 201, 151, 0.32);
}

/* Align secondary actions under download */
.download-section .copy-link-btn,
.download-section .report-btn {
    padding: 10px 16px;
    border-radius: 8px;
}

/* Responsive tweaks for file page */
@media (max-width: 768px) {
    .file-page { padding: 20px; }
    .file-hero { padding: 24px 16px; }
    .file-hero h1 { font-size: 1.2rem; }
}
