/* =========================================
   SILENTSUITE GLOBAL STYLES
   ========================================= */

/* 1. Base Setup */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Mencegah horizontal scroll tidak sengaja */
}

/* 2. Modern Scrollbar (Global) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* slate-300 */
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8; /* slate-400 */
}

/* 3. Custom Scrollbar untuk Container Kecil (File List) */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* 4. Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* New Animation for File Preview */
@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-scale {
    animation: fadeScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animasi Blob Background (Original) */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
.animation-delay-4000 {
    animation-delay: 4s;
}

/* Fade In Animation (Original) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 5. Range Slider Customization (Premium Look) */
input[type=range] {
    -webkit-appearance: none; /* Hides default slider */
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #10b981; /* brand-500 */
    cursor: pointer;
    margin-top: -8px; 
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    border: 2px solid #ffffff;
    transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e2e8f0; /* slate-200 */
    border-radius: 99px;
}

input[type=range]:focus {
    outline: none;
}

/* 6. Utility Helper */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism Utilities (Original) */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Loading Spinner Animation */
.fa-spin-fast {
    animation: fa-spin 1s infinite linear;
}

/* Responsive Container Fixes */
img, video {
    max-width: 100%;
    height: auto;
}

/* =========================================
   8. NEW UI COMPONENTS (v2.0 Update)
   ========================================= */

/* Back Button Style */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #64748b; /* slate-500 */
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: transparent;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.btn-back:hover {
    color: #0f172a; /* slate-900 */
    background-color: #f1f5f9; /* slate-100 */
    transform: translateX(-2px);
}

/* File Preview Item Card */
.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    animation: fadeScale 0.3s ease forwards;
}

.file-preview-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.file-thumb {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.5rem;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
}

.file-icon-placeholder {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 1.25rem;
    border: 1px solid #e2e8f0;
}

.file-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

@media (min-width: 640px) {
    .file-name {
        max-width: 300px;
    }
}

.file-size {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.btn-remove-file {
    color: #94a3b8;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-file:hover {
    color: #ef4444; /* red-500 */
    background-color: #fef2f2; /* red-50 */
}
