/* styles.css */
:root {
    --primary: #2c6fbb;
    --primary-dark: #2361a0;
    --secondary: #8ec5fc;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 160vh;
    position: relative;
    overflow-x: hidden;

}

/* Wavy Background */
.wavy-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;        
    z-index: 0;
    pointer-events: none;
    overflow: hidden;    
}

/* Wavy Background */
.wavy-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;  
    z-index: 0;
    pointer-events: none;
    overflow: hidden; 
    opacity: 0.85;  
}

/* Wave Layer */
.wave {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 140%;      
    height: 180px;
    transform: translateX(-50%);
    background-size: cover;
    background-repeat: no-repeat;
}

/* Animasi */
.wave-1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' opacity='.25' fill='%232c6fbb'/%3E%3C/svg%3E");
    animation: waveMove 20s linear infinite;
}

.wave-2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' opacity='.5' fill='%238ec5fc'/%3E%3C/svg%3E");
    animation: waveMove 15s linear infinite reverse;
    opacity: 0.45;
}

.wave-3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%234dabf7'/%3E%3C/svg%3E");
    animation: waveMove 25s linear infinite;
    opacity: 0.3;
}

@keyframes waveMove {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(-55%); }
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Upload Area */
.upload-area {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(255,255,255,0.95);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(44, 111, 187, 0.15);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.upload-area h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

.browse-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 111, 187, 0.3);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 111, 187, 0.4);
}

/* Upload List */
.upload-list {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(44, 111, 187, 0.05);
    border-radius: 8px;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.file-details h4 {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.file-details span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.uploading-animation {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-uploading {
    color: var(--warning);
    font-weight: 600;
}

.status-completed {
    color: var(--success);
    font-weight: 600;
}

.status-error {
    color: var(--error);
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 111, 187, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 111, 187, 0.4);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: rgba(0,0,0,0.02);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    z-index: 1000;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
               toastFadeOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 350px;
}

.toast.success { 
    background: linear-gradient(135deg, var(--success) 0%, #1e7e34 100%); 
}
.toast.error { 
    background: linear-gradient(135deg, var(--error) 0%, #c82333 100%); 
}
.toast.warning { 
    background: linear-gradient(135deg, var(--warning) 0%, #e0a800 100%); 
    color: #000; 
}
.toast.info { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
}

@keyframes toastSlideIn {
    from { 
        transform: translateX(100%) translateY(-20px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0) translateY(0); 
        opacity: 1; 
    }
}

@keyframes toastFadeOut {
    to { 
        transform: translateX(100%) translateY(-20px); 
        opacity: 0; 
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .toast {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
    
    .wavy-bg {
        opacity: 0.4;
    }
}

/* Mobile kecil (≤ 480px) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }

    .header p {
        font-size: 0.95rem;
    }

    .browse-btn, .btn-primary, .btn-secondary {
        width: 100%;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .file-details h4 {
        font-size: 0.95rem;
    }
}

/* Tablet (481px - 1024px) */
@media (max-width: 1024px) and (min-width: 481px) {
    .container {
        max-width: 90%;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .upload-area {
        padding: 50px 25px;
    }

    .action-buttons {
        flex-direction: row;
        gap: 10px;
    }
}

/* Desktop besar (≥ 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1000px;
    }

    .header h1 {
        font-size: 3rem;
    }

    .upload-area {
        padding: 80px 60px;
    }
}


/* Empty State */
.upload-list:empty::before {
    content: "Belum ada file yang diupload";
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px;
}

.yt-guide {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f7cff;                                
    background: rgba(31,124,255,0.1);   /* biru transparan */
    border: 1px solid rgba(31,124,255,0.4);
    border-radius: 6px;
    backdrop-filter: blur(4px);
    text-decoration: none;
    transition: 0.25s ease;
}

.yt-guide:hover {
    background: rgba(31,124,255,0.2);               
    border-color: rgba(31,124,255,0.7);
    box-shadow: 
        0 0 8px rgba(31,124,255,0.5),
        0 0 14px rgba(31,124,255,0.3);               /* glow biru */
    transform: translateY(-2px) scale(1.03);
}

.book-guide {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f7cff;                                
    background: rgba(31,124,255,0.1);   /* biru transparan */
    border: 1px solid rgba(31,124,255,0.4);
    border-radius: 6px;
    backdrop-filter: blur(4px);
    text-decoration: none;
    transition: 0.25s ease;
}

.book-guide:hover {
    background: rgba(31,124,255,0.2);               /* biru sedikit lebih pekat */
    border-color: rgba(31,124,255,0.7);
    box-shadow: 
        0 0 8px rgba(31,124,255,0.5),
        0 0 14px rgba(31,124,255,0.3);               /* glow biru */
    transform: translateY(-2px) scale(1.03);
}
