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

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Header */
header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

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

header h1 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 5px;
}

header h1 i {
    margin-right: 10px;
}

header p {
    color: #666;
    font-size: 0.95em;
}

.header-stats {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 10px;
    min-width: 80px;
}

.stat-item i {
    display: block;
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-item span {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
}

.stat-item small {
    display: block;
    color: #999;
    font-size: 0.75em;
    margin-top: 2px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 25px;
    background: transparent;
    border: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    transition: all 0.3s;
    font-weight: 500;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alert */
.alert {
    display: flex;
    align-items: flex-start;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(20px); opacity: 0; }
}

.alert i:first-child {
    font-size: 1.5em;
    color: #155724;
    margin-right: 15px;
    margin-top: 2px;
}

.alert strong {
    color: #155724;
    display: block;
}

.alert p {
    color: #155724;
    margin: 5px 0;
}

.close-alert {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #155724;
    opacity: 0.6;
}

.close-alert:hover {
    opacity: 1;
}

.link-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.link-container input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    background: #f8fff8;
    font-size: 0.9em;
}

.copy-btn {
    padding: 8px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #218838;
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.upload-section h2 {
    margin-bottom: 20px;
    color: #333;
}

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

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

.file-input-wrapper {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.file-input-wrapper:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

#fileInput {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

#fileLabel {
    cursor: pointer;
    color: #666;
}

#fileLabel i {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
    color: #667eea;
}

#fileInfo {
    color: #333;
    font-weight: 500;
}

#fileInfo #fileName {
    display: block;
    margin-bottom: 5px;
}

#fileInfo #fileSize {
    color: #999;
    font-weight: normal;
}

.custom-url-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.url-prefix {
    padding: 10px 12px;
    background: #f0f0f0;
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    border-right: 1px solid #ddd;
}

.custom-url-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 1em;
}

.custom-url-wrapper input:focus {
    box-shadow: inset 0 0 0 2px #667eea;
}

.help-text {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
}

button[type="submit"]:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress */
#uploadProgress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

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

#progressText {
    text-align: center;
    color: #666;
    margin-top: 10px;
}

#progressText i {
    margin-right: 8px;
}

/* Files Section */
.files-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.files-header {
    margin-bottom: 20px;
}

.files-header h2 {
    color: #333;
    margin-bottom: 15px;
}

.files-header h2 i {
    margin-right: 10px;
    color: #667eea;
}

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

.sort-control, .per-page-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-control label, .per-page-control label {
    color: #666;
    font-size: 0.9em;
}

.sort-control select, .per-page-control select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    outline: none;
}

.sort-control select:focus, .per-page-control select:focus {
    border-color: #667eea;
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid #e8e8e8;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-color: #667eea;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 45px;
    height: 45px;
    background: #f0f0ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon i {
    font-size: 1.5em;
    color: #667eea;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85em;
    color: #999;
}

.file-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.file-meta i {
    font-size: 0.85em;
}

.file-custom-url {
    color: #667eea;
    font-weight: 500;
}

/* Update tombol di file list */
.file-actions .download-btn {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.file-actions .download-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.download-btn, .copy-link-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.download-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.copy-link-btn {
    background: #f0f0f0;
    color: #666;
    padding: 8px 12px;
}

.copy-link-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: #666;
    font-size: 0.9em;
}

.pagination-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.page-link {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.page-link:hover {
    background: #f0f0f0;
    border-color: #667eea;
    color: #667eea;
}

.page-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-dots {
    padding: 6px 8px;
    color: #999;
}

/* Footer */
footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-stats {
        justify-content: center;
        gap: 15px;
    }
    
    .stat-item {
        padding: 8px 15px;
        min-width: 60px;
    }
    
    .stat-item span {
        font-size: 1.1em;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-control, .per-page-control {
        justify-content: center;
    }
    
    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-actions {
        margin-left: 0;
        justify-content: center;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
    }
    
    .file-meta {
        justify-content: center;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .link-container input {
        width: 100%;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: center;
        border-radius: 8px;
    }
    
    .file-meta {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}

/* Custom Notification */
.custom-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-notification i {
    font-size: 1.2em;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}