/* Scrolled Header Styles */
#site-header.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(230, 230, 230, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.dark #site-header.scrolled {
    background-color: rgba(30, 41, 59, 0.75);
    border-bottom-color: rgba(55, 65, 81, 0.6);
    box-shadow: none;
}

/* Base Styles */
body { 
    font-family: 'Poppins', sans-serif; 
}
.bg-clip-text { 
    -webkit-background-clip: text; 
    background-clip: text; 
}
/* === HARMONY STUDIO STYLES === */
.phone-mockup {
    border: 10px solid #1e293b; 
    border-radius: 35px; 
    overflow: hidden; 
    position: relative; 
    background: white;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2); 
    margin: 0 auto;
    transition: all 0.3s ease;
}
.dark .phone-mockup { 
    border-color: #0f172a; 
    background: #0f172a; 
}
.phone-notch {
    position: absolute; top: 0; left: 50%; 
    transform: translateX(-50%); 
    width: 80px; height: 20px;
    background: #1e293b; 
    border-bottom-left-radius: 12px; 
    border-bottom-right-radius: 12px; 
    z-index: 20;
}
.dark .phone-notch { 
    background: #0f172a; 
}
input[type=range] { 
    -webkit-appearance: none; 
    background: transparent; 
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    height: 18px; width: 18px; 
    border-radius: 50%;
    background: #8b5cf6; 
    cursor: pointer; 
    margin-top: -7px; 
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; 
    cursor: pointer; 
    background: #e2e8f0; 
    border-radius: 2px;
}
.dark input[type=range]::-webkit-slider-runnable-track { 
    background: #475569; 
}
.dropdown-open { 
    transform: scaleY(1); opacity: 1; visibility: visible; 
}
.dropdown-closed { 
    transform: scaleY(0.95); opacity: 0; visibility: hidden; 
}
.rule-option {
    -webkit-tap-highlight-color: transparent; /* For mobile taps */
}
/* ========================================= */
/* === IMAGE PALETTE TOOL SPECIFIC STYLES === */
/* ========================================= */

/* Custom Scrollbar (Slimmer for this tool) */
::-webkit-scrollbar { 
    width: 6px; 
}
::-webkit-scrollbar-track { 
    background: transparent; 
}
::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 4px; 
}
.dark ::-webkit-scrollbar-thumb { 
    background: #475569; 
}

/* Ambient Glow Animation Transitions */
#ambient-glow, #ambient-glow-2 { 
    transition: background-color 1.5s ease; 
}

/* Drag & Drop Zone Active State */
.drag-over {
    border-color: #8b5cf6 !important;
    background-color: rgba(139, 92, 246, 0.05);
}

/* Responsive Swatch Grid */
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

/* Hide Scrollbar Utility (For modal & horizontal lists) */
.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* Canvas Responsiveness */
canvas {
    max-width: 100%;
}
/* === EXPORT TOOL SPECIFIC STYLES === */

/* Toast Animation */
.toast-enter { 
    transform: translateY(100%); 
    opacity: 0; 
}
.toast-enter-active { 
    transform: translateY(0); 
    opacity: 1; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
}
.toast-exit { 
    transform: translateY(100%); 
    opacity: 0; 
    transition: all 0.3s ease-in; 
}

/* CSS Variables for Preview */
:root { 
    --color-primary: #8b5cf6; 
    --color-secondary: #ec4899; 
    --color-surface: #ffffff; 
}
/* ========================================= */
/* === PAGE TRANSITION LOADER STYLES === */
/* ========================================= */

.gooey-container {
    width: 200px;
    height: 200px;
    position: relative;
    /* Gooey Filter */
    filter: url(#goo);
    animation: rotate-whole 6s linear infinite;
}

.blob {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; 
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Brand Colors */
.blob:nth-child(1) {
    background: #8b5cf6; /* Purple */
    animation: blob-1-anim 3s ease-in-out infinite;
}
.blob:nth-child(2) {
    background: #ec4899; /* Pink */
    animation: blob-2-anim 3s ease-in-out infinite;
}
.blob:nth-child(3) {
    background: #f97316; /* Orange */
    animation: blob-3-anim 3s ease-in-out infinite;
}

/* Animations */
@keyframes blob-1-anim {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg) translate(0, 0); }
    50% { transform: translate(-50%, -50%) rotate(0deg) translate(0, -65px); }
}
@keyframes blob-2-anim {
    0%, 100% { transform: translate(-50%, -50%) rotate(120deg) translate(0, 0); }
    50% { transform: translate(-50%, -50%) rotate(120deg) translate(0, -65px); }
}
@keyframes blob-3-anim {
    0%, 100% { transform: translate(-50%, -50%) rotate(240deg) translate(0, 0); }
    50% { transform: translate(-50%, -50%) rotate(240deg) translate(0, -65px); }
}
@keyframes rotate-whole {
    100% { transform: rotate(360deg); }
}
/* Header Hide Animation Class */
.header-hidden {
    transform: translateY(-100%);
}

/* Ensure smooth transition */
#site-header {
    transition: transform 0.3s ease-in-out, background-color 0.3s ease, padding 0.3s ease;
}
/* === THEME TOGGLE ANIMATION === */

/* Slider ka smooth transition set karein */
#theme-slider {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    /* Default position (Light Mode) */
    transform: translateX(0);
}

/* Jab Dark Mode ON ho (HTML tag pe 'dark' class ho) */
html.dark #theme-slider {
    /* Slider ko 28px right side khiska do */
    transform: translateX(28px) !important; 
    
    /* Dark mode mein slider ka background color */
    background-color: #1e293b; 
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Icon ghumne wala animation */
html.dark #theme-slider i {
    animation: spin-icon 0.5s ease-out;
}

@keyframes spin-icon {
    from { transform: rotate(-180deg); opacity: 0; }
    to { transform: rotate(0); opacity: 1; }
}
/* === LOGO ROTATION ANIMATION === */

/* Logo Icon Base Style (Light Mode) */
.logo-icon {
    /* Isse logo smooth ghumega aur thoda bounce karega */
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    
    /* Default position (Light Mode): 0 degree */
    transform: rotate(0deg);
}

/* Dark Mode Position */
html.dark .logo-icon {
    /* Jab Dark mode aaye, to logo ko 180 degree ghuma do */
    transform: rotate(180deg);
}