/* public/css/files.css */

body {
    background-color: #0f172a;
}

.files-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    color: #e2e8f0;
    min-height: 100vh;
}

.files-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 50%, #2196f3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section {
    background: rgba(30, 30, 50, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.upload-cta {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-upload-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.3);
}

.btn-upload-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(100, 181, 246, 0.4);
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 35, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

.files-table thead {
    background: rgba(50, 50, 70, 0.8);
}

.files-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #90caf9;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(100, 181, 246, 0.3);
}

.files-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.files-table tbody tr:hover {
    background: rgba(60, 60, 80, 0.6);
    transform: translateX(4px);
}

.files-table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    color: #e2e8f0;
}

.col-icon {
    width: 48px;
    text-align: center;
    font-size: 1.5rem;
}

.col-filename {
    min-width: 200px;
    font-weight: 600;
}

.col-filename strong {
    color: #fff;
}

.file-desc {
    color: #90caf9;
    font-size: 0.8rem;
    font-weight: normal;
}

.col-uploader {
    width: 120px;
    color: #90caf9;
}

.col-date {
    width: 160px;
    font-size: 0.85rem;
    color: #b0bec5;
}

.col-size {
    width: 90px;
    text-align: right;
    font-family: 'Courier New', monospace;
    color: #90caf9;
}

.col-downloads {
    width: 90px;
    text-align: center;
    font-weight: 600;
    color: #81c784;
}

.col-access {
    width: 110px;
    text-align: center;
}

.col-actions {
    width: 180px;
}

.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-block;
}

.badge-public {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-restricted {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge-admin {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.action-buttons {
    display: flex;
    gap: 0.375rem;
}

.btn {
    padding: 0;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.btn-view {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-copy {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81c784;
}

.no-files {
    text-align: center;
    color: #90caf9;
    font-size: 1.1rem;
    padding: 3rem;
    opacity: 0.8;
}

.files-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(30, 30, 50, 0.98);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 520px;
    width: 90vw;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.close-modal {
    background: rgba(144, 202, 249, 0.2);
    border: 1px solid rgba(144, 202, 249, 0.3);
    color: #90caf9;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(144, 202, 249, 0.4);
    transform: rotate(90deg);
}

.checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(50, 50, 70, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #90caf9;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-upload {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.4);
}

@media (max-width: 1024px) {
    .files-table {
        font-size: 0.85rem;
    }
    
    .col-date, .col-uploader {
        display: none;
    }
}

@media (max-width: 768px) {
    .files-container {
        padding: 1rem;
    }
    
    .section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .files-table {
        background: transparent;
        border-radius: 0;
    }
    
    .files-table thead {
        display: none;
    }
    
    .files-table, .files-table tbody {
        display: block;
    }
    
    .files-table tbody tr {
        display: flex;
        flex-direction: column;
        background: rgba(30, 30, 50, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }
    
    .files-table tbody tr:hover {
        transform: none;
    }
    
    .files-table td {
        display: block;
        padding: 0;
        width: 100% !important;
        min-width: 0 !important;
        text-align: left !important;
    }
    
    .col-icon {
        position: absolute;
        top: 1rem;
        left: 1rem;
        width: auto;
        font-size: 2rem;
    }
    
    .files-table tbody tr {
        position: relative;
        padding-left: 4rem;
    }
    
    .col-filename {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .col-filename strong {
        display: block;
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .file-desc {
        display: block;
        margin-top: 0.25rem;
    }
    
    .col-uploader, .col-date, .col-size, .col-downloads {
        display: inline-block !important;
        width: auto !important;
        font-size: 0.85rem;
    }
    
    .col-uploader::before {
        content: "👤 ";
        opacity: 0.7;
    }
    
    .col-date::before {
        content: "📅 ";
        opacity: 0.7;
    }
    
    .col-size::before {
        content: "💾 ";
        opacity: 0.7;
    }
    
    .col-downloads::before {
        content: "⬇️ ";
        opacity: 0.7;
    }
    
    .col-uploader, .col-date, .col-size {
        margin-right: 1rem;
    }
    
    .col-access {
        margin-bottom: 0.5rem;
    }
    
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        height: 44px;
        font-size: 0.9rem;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .btn::after {
        content: attr(title);
        font-size: 0.85rem;
    }
    
    .btn-view::after {
        content: "View";
    }
    
    .btn-copy::after {
        content: "Copy Link";
    }
    
    .btn-edit::after {
        content: "Permissions";
    }
    
    .btn-delete::after {
        content: "Delete";
    }
    
    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
}
