/**
 * ImageKit.io Uploader - Stylesheet
 * 
 * Styling untuk form upload dan preview hasil
 */

/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Container Utama */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Header */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

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

/* Form Upload */
.upload-section {
    padding: 40px;
}

.upload-form {
    text-align: center;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.file-input-label:active {
    transform: translateY(0);
}

/* File List Display */
.file-list {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.file-item:last-child {
    border-bottom: none;
}

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

.file-icon {
    font-size: 1.2rem;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

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

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove:hover {
    background: #c82333;
}

.upload-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-top: 20px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1rem;
}

/* Hasil Upload */
.result-section {
    display: none;
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Upload Summary */
.upload-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Images Table */
.images-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.images-table th {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.images-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.images-table tr:last-child td {
    border-bottom: none;
}

.images-table tr:hover {
    background: #f8f9fa;
}

/* Table Columns */
.col-no {
    width: 50px;
    text-align: center;
    font-weight: 600;
    color: #3b82f6;
}

.col-preview {
    width: 80px;
    text-align: center;
}

.col-name-old {
    width: 180px;
    font-weight: 500;
    color: #333;
}

.col-name-new {
    width: 180px;
    font-weight: 500;
    color: #3b82f6;
}

.col-size {
    width: 100px;
    font-size: 0.9rem;
    color: #666;
}

.col-dimensions {
    width: 120px;
    font-size: 0.9rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.col-actions {
    width: 200px;
    text-align: center;
}

/* Preview Image */
.preview-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-image:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

.action-btn.copied {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.result-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.image-preview {
    text-align: center;
    margin-bottom: 30px;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-preview img:hover {
    transform: scale(1.02);
}

.image-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Tombol Copy */
.copy-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.copy-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
  cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 500;
}

/* Success Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
        border-radius: 15px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .upload-section, .result-section {
        padding: 20px 15px;
    }
    
    .copy-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .copy-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Responsive Table */
    .table-container {
        overflow-x: auto;
    }
    
    .images-table {
        min-width: 600px;
    }
    
    .images-table th,
    .images-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .col-name-old {
        width: 120px;
    }
    
    .col-name-new {
        width: 120px;
    }
    
    .col-size {
        width: 80px;
    }
    
    .col-dimensions {
        width: 100px;
    }
    
    .col-actions {
        width: 150px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .preview-image {
        width: 50px;
        height: 50px;
    }
}

/* Animasi */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}