body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
}

.upload-form {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.file-input {
    display: block;
    margin: 10px 0;
}

.submit-btn {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

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

/* Info box for share link expiration notice */
.info-box {
    margin-top: 15px;
    padding: 10px;
    background-color: #f1f9fe;
    border-left: 4px solid #3498db;
    border-radius: 3px;
    font-size: 14px;
}

.info-box p {
    margin: 5px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #f5f5f5;
}

/* File and Share status styling */
.file-status, .share-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.file-status {
    background-color: #e8f4fd;
    color: #31708f;
    border: 1px solid #bce8f1;
}

.share-status.active {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.share-status.inactive {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Admin panel styling */
.admin-panel {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #5bc0de;
}

.admin-storage-info {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.admin-buttons {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #5bc0de;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.admin-btn:hover {
    background-color: #31b0d5;
}

.admin-btn.warning {
    background-color: #f0ad4e;
}

.admin-btn.warning:hover {
    background-color: #ec971f;
}

.admin-btn.danger {
    background-color: #d9534f;
}

.admin-btn.danger:hover {
    background-color: #c9302c;
}

.action-link {
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
    display: inline-block;
    margin-right: 5px;
    transition: background-color 0.3s;
}

.download-link {
    background-color: #2ecc71;
}

.download-link:hover {
    background-color: #27ae60;
}

.download-link.disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    pointer-events: none;
}

.delete-link {
    background-color: #e74c3c;
}

.delete-link:hover {
    background-color: #c0392b;
}

.share-link {
    background-color: #f39c12;
}

.share-link:hover {
    background-color: #d35400;
}

/* New style for the view link button */
.view-link {
    background-color: #3498db;
}

.view-link:hover {
    background-color: #2980b9;
}

.flash-messages {
    list-style: none;
    padding: 0;
}

.flash-message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 3px;
    background-color: #d4edda;
    color: #155724;
    word-break: break-all;
}

/* Progress bar styles */
.upload-progress-container,
.download-progress-container {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.upload-progress-bar,
.download-progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.upload-progress-text,
.download-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 20px;
    color: #2c3e50;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.8);
}

.file-name-display {
    margin: 5px 0 10px;
    font-size: 14px;
    color: #7f8c8d;
}

/* IP info styling */
.ip-info {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #eee;
}

.no-access {
    display: inline-block;
    padding: 5px 10px;
    background-color: #95a5a6;
    color: white;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    /* Table adjustments */
    .files-list table {
        width: 100%;
        display: block;
        overflow-x: auto;
    }
    
    /* Handle long filenames */
    td:first-child {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Smaller font for mobile */
    th, td {
        padding: 8px 5px;
        font-size: 14px;
    }
    
    /* Make action buttons stack on small screens */
    .action-link {
        display: block;
        margin-bottom: 5px;
        text-align: center;
    }
    
    /* Adjust the file input and buttons */
    .file-input {
        width: 100%;
    }
    
    .submit-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Better container padding */
    .container {
        padding: 15px 10px;
    }
}

/* Tooltip for long filenames (works on all screen sizes) */
td:first-child {
    position: relative;
}

td:first-child:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #333;
    color: white;
    padding: 5px;
    border-radius: 3px;
    z-index: 100;
    max-width: 200px;
    word-wrap: break-word;
}

/* Storage usage display */
.storage-container {
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.storage-info {
    margin-bottom: 5px;
    font-size: 14px;
}

.storage-bar-container {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.storage-bar {
    height: 100%;
    background-color: #4caf50;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Change color based on usage */
.storage-bar[style*="width: 8"] {
    background-color: #ff9800;
}

.storage-bar[style*="width: 9"] {
    background-color: #ff9800;
}

.storage-bar[style*="width: 1"] {
    background-color: #f44336;
}

.info-box {
    margin-top: 15px;
    padding: 10px;
    background-color: #f1f9fe;
    border-left: 4px solid #3498db;
    border-radius: 3px;
    font-size: 14px;
}

.copyable-link {
    background-color: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #ddd;
    word-break: break-all;
}

.copy-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background-color: #2980b9;
}

.copy-btn.copied {
    background-color: #27ae60;
}

/* Add these styles to your main.css file */

.share-link-container {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.success-message {
    font-weight: bold;
    margin-bottom: 10px;
}

.share-link-container .copyable-link {
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
    word-break: break-all;
}

.share-link-container .copy-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
}

.share-link-container .copy-btn:hover {
    background-color: #2980b9;
}