/* --- Root Variables & Theme Configuration --- */
:root {
    --primary: #0ea5e9; /* Sky 500 */
    --primary-hover: #0284c7; /* Sky 600 */
    --bg-dark: #0f1115;
    --bg-sidebar: #13161c;
    --bg-card: #181b21;
    --border-color: #2a2e36;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --groq-color: #f55036; /* Groq Brand Color */
}

/* Base Styles */
body { font-family: 'Inter', sans-serif; background-color: var(--bg-dark); color: var(--text-main); overflow: hidden; }

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- SLEEK MODERN SLIDERS (Refined Design) --- */
input[type=range] { 
    -webkit-appearance: none; 
    width: 100%; 
    background: transparent; 
    cursor: pointer; 
    height: 20px; 
    margin: 5px 0;
}

/* Track */
input[type=range]::-webkit-slider-runnable-track { 
    width: 100%; 
    height: 4px; 
    background: #2a2e36; 
    border-radius: 4px;
    border: none;
    transition: background 0.3s;
}

input[type=range]:hover::-webkit-slider-runnable-track {
    background: #374151;
}

/* Thumb */
input[type=range]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    height: 16px; 
    width: 16px; 
    border-radius: 50%; 
    background: var(--primary); 
    border: 2px solid #fff; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); 
    margin-top: -6px; 
    transition: all 0.2s ease;
}

/* Hover Animation */
input[type=range]:hover::-webkit-slider-thumb { 
    transform: scale(1.2); 
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* Active/Drag Animation */
input[type=range]:active::-webkit-slider-thumb {
    transform: scale(1.1);
    background: #fff;
    border-color: var(--primary);
}

input[type=range]:focus { outline: none; }

/* Value Display Text */
.slider-value-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    background: rgba(14, 165, 233, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Input Fields */
.glass-input { 
    background-color: #1f2329; border: 1px solid var(--border-color); color: white; transition: all 0.2s; 
}
.glass-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* Buttons */
.platform-btn { 
    background: #1e293b; 
    border: 1px solid var(--border-color); 
    color: var(--text-muted); 
    cursor: pointer; 
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Hover Effect - Lift up and colorful border */
.platform-btn:hover { 
    background: #2d3748; 
    color: white; 
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Shine Animation Effect */
.platform-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.platform-btn:hover::after {
    left: 100%;
}

/* Active State - Glowing */
.platform-btn.active { 
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-color: var(--primary); 
    color: white; 
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.3); 
    font-weight: 700;
}

/* Specific Brand Colors on Hover (Optional, adds more color) */
.btn-adobe:hover { border-color: #ff0000; color: #ffcccc; box-shadow: 0 0 10px rgba(255, 0, 0, 0.2); }
.btn-shutter:hover { border-color: #eb3300; color: #ffd6cc; box-shadow: 0 0 10px rgba(235, 51, 0, 0.2); }
.btn-freepik:hover { border-color: #3b82f6; color: #bfdbfe; box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
.btn-general:hover { border-color: #10b981; color: #a7f3d0; box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }

/* Toggle Switch */
.toggle-checkbox:checked { right: 0; border-color: var(--primary); }
.toggle-checkbox:checked + .toggle-label { background-color: var(--primary); }
.toggle-label { width: 40px; height: 20px; position: relative; display: inline-block; background-color: #333; border-radius: 9999px; cursor: pointer; transition: all 0.2s; }
.toggle-label:after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background-color: white; border-radius: 50%; transition: all 0.2s; }
.toggle-checkbox:checked + .toggle-label:after { left: calc(100% - 2px); transform: translateX(-100%); }
.toggle-checkbox { display: none; }

/* Animations */
.loader { border: 2px solid rgba(255,255,255,0.1); border-top: 2px solid var(--primary); border-radius: 50%; width: 16px; height: 16px; animation: spin 0.8s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }

/* Shimmer/Jelmel Animation */
@keyframes shine {
    0% { transform: translateX(-150%) skewX(-12deg); }
    100% { transform: translateX(150%) skewX(-12deg); }
}
.animate-shine {
    animation: shine 2s infinite linear;
}

/* Toast Notification */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { 
    background: var(--bg-card); border-left: 4px solid var(--primary); 
    padding: 12px 20px; border-radius: 4px; color: white; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); font-size: 0.9rem; 
    display: flex; align-items: center; gap: 10px; min-width: 250px;
    animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Dropdown Menu */
.export-menu {
    position: absolute; bottom: 100%; right: 0; margin-bottom: 8px;
    background: #1e293b; border: 1px solid var(--border-color);
    border-radius: 8px; width: 200px; padding: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: none; flex-direction: column; gap: 2px;
    z-index: 50;
}
.export-menu.show { display: flex; animation: fadeIn 0.15s ease-out; }
.export-item {
    padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 500;
    color: var(--text-muted); border-radius: 4px; transition: all 0.2s;
    display: flex; align-items: center; gap: 8px;
}
.export-item:hover { background: var(--primary); color: white; }

.hidden { display: none !important; }
.disabled-field { opacity: 0.3; pointer-events: none; }

/* Specific Styles for Prompt Mode Hiding */
body.app-mode-prompt .meta-field { display: none !important; }
body.app-mode-prompt .desc-container textarea { height: 120px; } /* Taller textarea for prompts */

/* --- ADDED FOR PROFILE POPUP (Hubohu as requested) --- */
/* Custom Animation for Image */
@keyframes pulse-ring {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.image-animate {
    animation: pulse-ring 2s infinite;
}

/* --- FIXED 16:9 PREVIEW BOX STYLES (Letterbox Logic) --- */
.preview-box-fixed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* ফিক্সড ১৬:৯ রেশিও */
    background-color: #000000; /* কালো ব্যাকগ্রাউন্ড (বর্ডার ইফেক্টের জন্য) */
    border: 1px solid #2a2e36;
    border-radius: 8px;
    overflow: hidden;
    display: flex; 
    align-items: center;
    justify-content: center;
}

/* ইমেজ সম্পূর্ণ দেখানোর জন্য এবং সেন্টারে রাখার জন্য  */
.preview-box-fixed img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ইমেজ কাটবে না, পুরোটা দেখা যাবে */
    display: block;
}

/* আইকনের জন্য সেন্টার স্টাইল */
.preview-box-fixed .icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}