/* modern styles.css for the demo template */

:root {

    /* Dynamic Theme Colors - Set via Dashboard */
    --bg-color-light: #f5f7fa

    ;

    --bg-color-dark: #0f172a

    ;

    --primary-color: #ff6b6b

    ;

    --secondary-color: #4ecdc4

    ;

    /* Fallbacks if not provided */
    --fallback-bg-light: #f5f7fa;
    --fallback-bg-dark: #0f172a;
    --fallback-primary: #ff6b6b;
    --fallback-secondary: #4ecdc4;

    /* Base Variables */
    --text-light: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted-light: #64748b;
    --text-muted-dark: #94a3b8;

    --glass-bg-light: rgba(255, 255, 255, 0.7);
    --glass-bg-dark: rgba(15, 23, 42, 0.7);
    --glass-border-light: rgba(255, 255, 255, 0.5);
    --glass-border-dark: rgba(255, 255, 255, 0.1);

    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--bg-color-light, var(--fallback-bg-light));
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    padding: 1.5rem;
}

/* Disable default transition when using View Transitions API to avoid conflicts */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 9999;
}



/* Glassmorphism Background effect */
.glass-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(var(--primary-color-rgb, 255, 107, 107), 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(var(--secondary-color-rgb, 78, 205, 196), 0.15), transparent 25%);
    transition: var(--transition-smooth);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 900px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--glass-bg-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 255, 255, 0.5) inset;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
    animation: fadeUpIn 1s ease-out forwards;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header & Logo */
.header {
    margin-bottom: 0.5rem;
}

.site-logo {
    max-height: 60px;
    max-width: 250px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    /* fallback if clip fails */
    background: linear-gradient(135deg, var(--primary-color, var(--fallback-primary)), var(--secondary-color, var(--fallback-secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

body.dark-mode .content h1 {
    color: var(--text-light);
}

/* Glitch Effect */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color, var(--fallback-primary)), var(--secondary-color, var(--fallback-secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 rgba(255, 0, 0, 0.3);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 rgba(0, 255, 255, 0.3);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
    }

    60% {
        clip-path: inset(20% 0 50% 0);
    }

    80% {
        clip-path: inset(50% 0 30% 0);
    }

    100% {
        clip-path: inset(5% 0 80% 0);
    }
}

.subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    font-weight: 500;
    color: var(--secondary-color, var(--fallback-secondary));
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.main-text {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-muted-dark);
    max-width: 600px;
    margin: 0 auto 0.5rem auto;
}

/* SVG Container Styling */
.svg-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
    perspective: 1000px;
    flex: 1;
    min-height: 0;
}

.responsive-svg {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 38vh;
    filter: drop-shadow(0px 20px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.5s ease;
}

.svg-inner-wrapper {
    transform-origin: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Animated Eyes */
.animated-eyes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 5;
}

.eye {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) inset, 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--primary-color, var(--fallback-primary));
}

.pupil {
    width: 20px;
    height: 20px;
    background: #111;
    border-radius: 50%;
    position: absolute;
}

.pupil::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
}

.eyelid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color, var(--fallback-primary));
    transform: translateY(-100%);
    border-radius: 50%;
}

body.dark-mode .eye {
    border-color: var(--secondary-color, var(--fallback-secondary));
}

body.dark-mode .eyelid {
    background: var(--secondary-color, var(--fallback-secondary));
}

/* Footer */
.footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted-dark);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.developer-credit {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.developer-credit a {
    color: var(--primary-color, var(--fallback-primary));
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.developer-credit a:hover {
    color: var(--secondary-color, var(--fallback-secondary));
    text-decoration: underline;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--glass-border-light);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-dark);
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
}

.moon-icon {
    display: none;
}

/* DARK MODE */
body.dark-mode {
    background: var(--bg-color-dark, var(--fallback-bg-dark));
    color: var(--text-light);
}

body.dark-mode .container {
    background: var(--glass-bg-dark);
    border-color: var(--glass-border-dark);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.05) inset;
}

body.dark-mode .main-text {
    color: var(--text-light);
}

body.dark-mode .footer {
    color: var(--text-light);
}

body.dark-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--glass-border-dark);
    color: var(--text-light);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: block;
}

body.dark-mode .responsive-svg {
    filter: drop-shadow(0px 20px 30px rgba(0, 0, 0, 0.4));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .container {
        width: 100%;
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}