/* ------------------------ */
/* CSS VARIABLES */
/* ------------------------ */
:root {
    --spacing-xsm: 0.2rem;
    --spacing-sm: 0.425rem;
    --spacing-md: 0.85rem;
    --spacing-lg: 2rem;
    --border-radius: 11px;
    --border-radius-input: 1.25rem;
    --border-radius-button: 8px;
    --border-radius-round: 30px;
    --font-family: "Open Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

    --font-size-xsm: 0.75rem;
    --font-size-sm: 0.85em;
    --font-size-md: 1em;
    --font-size-lg: 1.1em;
    --font-size-xlg: 1.3em;
    --font-size-console: 13px;
    /* larger dividers */
    --divider-margin: -1px;
    --divider-width: 5px;
    --window-border-radius: 8px;
    --window-border-color: var(--color-primary);

    /* smaller dividers (default)*/
    --divider-margin: -2px;
    --divider-width: 5px;
    --window-border-radius: 0;
    --window-border-color: var(--color-border-color);

    --search-result-hilight-background: #fc650054;
    --color-preview-background: var(--color-third);

    --color-error: #e64348;
    /* Strong red for errors */
    --color-info: #5683e4;
    /* Clear blue for info */
    --color-warn: #bb992a;
    /* Golden-yellow for warnings */
    --color-debug: #a658f0;
    /* Soft purple for debug logs */
    --color-success: #39b56b;

}

:root {
    /* Fonts */
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-code: 'Fira Code', monospace;

    /* Font Sizes */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 3rem;
    --fs-4xl: 4rem;
    --fs-5xl: 5rem;

    /* Spacing */
    --space: 0.05rem;
    --space-0: 0.15rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
    --space-12: 5rem;
    --space-14: 6rem;
    --space-16: 8rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition: 250ms ease-in-out;
    --transition-med: 200ms ease;
    --transition-slow: 400ms ease;
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 500;
    --z-modal: 1000;
    --z-max: 9999;

    /* UI Sizes */
    --btn-height: 2.5rem;
    --btn-min-width: 8rem;
    --input-height: 2.5rem;
    --section-padding: var(--space-6);
}

[data-theme="light"] {
    --bg: #f5f3f0;
    --fg: #000000;
    --muted: #555555;
    --muted-rgb: 85, 85, 85;
    --accent: #1625ff;
    --accent-alt: #2bb4aa;
    --accent-text: #ffffff;
    --accent-text-hover: #ffffff;
    --button: #ece9e6;
    --border: #dbd9d1;
    --border-hover: #b3b1a9;
    --bg-alt: #f0ede8;
    --muted-bg: #ebe7e1;
    --header-bg: #f5f3f0e8;
    --card-bg: #e7e4df80;
    --card-bg-hover: #e7e4df9c;
    --image-glow: 60, 127, 252;

    --gradient-text: linear-gradient(45deg, #1625ff 0%, #2bb4aa 60%, #1625ff 85%);
    --btn-gradient: linear-gradient(90deg, #1625ff 0%, #2bb4aa 60%, #2bb4aa 120%);

    --art-c1: #f4c542;
    --art-c2: #6cbfa3;
    --art-c3: #ff7a45;
    --art-c4: #ffffff;
    --art-c5: #2f91d2;
    --art-c6: #bbbbbb;
    --tooltip: rgba(255, 255, 255, 0.5);

    --color-assistant: #ffffff;
    --color-light-blue: #cfddfc;
    --color-dark-blue: #e5effd;
    --color-primary: #f5f3f0;
    --color-secondary: #f5f3f0;
    --color-third: #f5f3f0;
    --color-fourth: #f5f3f0;
    --color-fifth: #f0ede8;
    --color-comment: #f5f3f0;
    --color-border-color: #dbd9d1;
    --color-border-hover: #c2c0b7;
    --color-accent: #16161f;
    --color-accent-hover: #394456;
    --color-accent-text: #ffffff;
    --color-accent2: #1625ff;
    --color-accent2-hover: #1625ff;
    --color-accent2-text: #ffffff;
    --color-accent4: #eeedfd;
    --color-accent4-text: #5748c7;
    --color-note-text: #555555;
    --color-text: #000000;
    --color-textHilight: #000000;
    --color-blur: #f5f3f0ad;
    --color-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
    --scroll-background: #f1f4f8;
    --scroll-thumb: #d5dce7;
    --color-href: #0084ff;
    --color-href-hover: #0084ff;
    --color-href-visited: #6e6efa;
    --color-href-active: #8c8cff;
    --color-selected: rgba(0, 123, 255, 0.158);
    --color-editor: #ffffff;
    --color-editor-header: #f8fafd;
    --color-editor-tabs: #f8fafd;
    --color-file-explorer: #f8fafd;
    --color-file-hover: #f3f5f8;
    --color-file-active: #e9eef6;

    --color-window-header: #f8fafd;
    --color-window-header-hover: #e0e6f0;
}

[data-theme="dark"] {
    --bg: #08090b;
    --fg: #ffffff;
    --muted: #a7a8a9;
    --muted-rgb: 153, 153, 153;
    --accent: #3c7ffc;
    --accent-alt: #71d3cb;
    --accent-text: #03080d;
    --accent-text-hover: #ffffff;
    --button: #151619;
    --border: #27282b;
    --border-hover: #444648;
    --bg-alt: #101114;
    --muted-bg: #1a1b1e;
    --header-bg: rgba(8, 9, 11, 0.9);
    --card-bg: rgba(8, 9, 11, 0.5);
    --card-bg-hover: rgba(23, 26, 34, 0.50);
    --image-glow: 60, 127, 252;

    --gradient-text: linear-gradient(45deg, #fff 0%, #71d3cb 60%, #1625ff 85%);
    --btn-gradient: linear-gradient(90deg, #fff 0%, #71d3cb 60%, #1625ff 120%);

    --art-c1: #e8b02d;
    --art-c2: #427e63;
    --art-c3: #ec5b22;
    --art-c4: #f5f0cd;
    --art-c5: #1993bf;
    --art-c6: #464545;
    --tooltip: rgba(255, 255, 255, 0.08);

    --color-assistant: rgb(65, 104, 136);
    --color-light-blue: #212325;
    --color-dark-blue: #1f2730;
    --color-primary: #08090b;
    --color-secondary: #08090b;
    --color-third: #08090b;
    --color-fourth: #08090b;
    --color-fifth: #101114;
    --color-file-explorer: #08090b;
    --color-file-hover: #08090b;
    --color-file-active: #08090b;
    --color-comment: #08090b;
    --color-border-color: #27282b;
    --color-border-hover: #444648;
    --color-accent: #eaeff3;
    --color-accent-hover: #c6d1e5;
    --color-accent-text: #111a2c;
    --color-accent2: #1625ff;
    --color-accent2-hover: #1625ff;
    --color-accent2-text: #ffffff;
    --color-accent4: #2d2b38;
    --color-accent4-text: #9f9fe0;
    --color-note-text: #a7a8a9;
    --color-text: #ffffff;
    --color-textHilight: #ffffff;
    --color-blur: #08090bad;
    --color-box-shadow: 0 4px 20px 0 rgba(28, 29, 31, 0.75);
    --scroll-background: #1d2124;
    --scroll-thumb: #324046;
    --color-href: #649efc;
    --color-href-hover: #649efc;
    --color-href-visited: #7979ff;
    --color-href-active: #7979ff;
    --color-selected: rgba(0, 123, 255, 0.2582);
    --color-editor: #181b1d;
    --color-editor-header: #121416;
    --color-editor-tabs: #121416;

    --color-window-header: #121416;
    --color-window-header-hover: #1f2225;

}

* {
    /* scrollbar-width: thin; */
    scrollbar-color: var(--border) var(--card-bg);
}

/* ------------------------ */
/* KEYFRAMES */
/* ------------------------ */

@keyframes heroElementFadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fillHeadingGradient {
    0% {
        background-size: 0% 100%;
    }

    100% {
        background-size: 100% 100%;
    }
}

@keyframes strokeFade {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }

    15% {
        transform: translate(var(--x), var(--y)) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(0.5);
        opacity: 0;
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.5) drop-shadow(0 0 10px var(--accent-alt));
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(var(--accent-alt-rgb, 113, 211, 203), 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(var(--accent-alt-rgb, 113, 211, 203), 0.6), 0 0 35px rgba(var(--accent-alt-rgb, 113, 211, 203), 0.4);
    }
}

@keyframes pulse-wave {
    0% {
        transform: scale(0.8);
        opacity: 0.4;
    }

    50% {
        opacity: 0.1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes rotate-dots {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ------------------------ */
/* BASE STYLES */
/* ------------------------ */

body {
    margin: 0;
    font-family: var(--font-ui);
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    font-size: var(--fs-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    line-height: 1.2;
    color: var(--fg);
}

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: var(--muted);
}

a {
    color: var(--fg);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

/* ------------------------ */
/* LAYOUT COMPONENTS */
/* ------------------------ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    position: relative;
    z-index: 2;
}

.templates-section .container {
    max-width: 100%;
    padding: 0;
}

.section {
    position: relative;
    z-index: 2;
    padding: var(--space-8) 0;
}

.color-section {
    position: relative;
    z-index: 2;
}

.color-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.8s ease, transform 1.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------ */
/* BUTTONS */
/* ------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--btn-height);
    padding: var(--space-1) var(--space-6);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

/* .btn-primary {
    background-color: var(--fg);
    color: var(--accent-text);
    border-color: var(--fg);
    border-radius: var(--radius-full);
}

.btn-primary:hover {
    background-color: var(--accent);
    color: var(--accent-text-hover);
    border-color: var(--accent);
} */




.btn-primary span {
    position: relative;
    z-index: 3;
}

.btn-primary {
    background: var(--fg);
    color: var(--accent-text);
    border: 2px solid var(--fg);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-med);
    text-align: center;
    z-index: 0;
}

.btn-primary:hover {
    color: var(--accent-text);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: var(--btn-gradient);
    transition: left var(--transition-med), background var(--transition-med);
    border-radius: var(--radius-full);
    z-index: 2;
}


.btn-primary:hover::before {
    background: var(--btn-gradient);
    left: 0;
}













.btn-alt {
    border-radius: var(--radius-full);
    background-color: var(--accent-alt);
    color: var(--bg);
    border-color: var(--accent-alt);
}

.btn-alt:hover {
    background-color: var(--accent);
    color: var(--accent-text-hover);
    border-color: var(--accent);
    border-radius: var(--radius-full);
}

.btn-secondary {
    background-color: var(--button);
    color: var(--muted);
    border-color: var(--border);
}

.btn-secondary:hover {
    color: var(--fg);
    background-color: var(--border);
    border-color: var(--border-hover);
}

.btn-secondary i {
    margin-left: var(--space-4);
}

.header .btn {
    padding: var(--space) var(--space-5);
}

.center-btns {
    margin-top: var(--space-8);
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-10);
    position: relative;
}

/* ------------------------ */
/* HEADER */
/* ------------------------ */

.header {
    background-color: var(--header-bg);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--space-4) 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    font-size: var(--fs-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg);
    margin-right: var(--space-8);
}

.nav {
    flex-grow: 1;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-6);
}

.nav li {
    position: relative;
}

.nav a {
    font-weight: 400;
    font-size: var(--fs-sm);
    padding: var(--space-2) 0;
    position: relative;
    z-index: 101;
}

.nav .dropdown .ti {
    font-size: var(--fs-xs);
    vertical-align: middle;
    margin-left: var(--space-1);
}

.header .user-controls {
    display: flex;
    gap: var(--space-3);
    z-index: 9999;
}

/* Header Dropdown */
.header-dropdown {
    position: relative;
}

.dropdown-toggle {
    white-space: nowrap;
    z-index: 101;
}

.header-dropdown.open>.header-dropdown-menu {
    display: block;
    opacity: 1 !important;
    pointer-events: auto;
}


/* Enable only when .open is active */
.header-dropdown:hover .header-dropdown-me .header-dropdown.open .header-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
}

.header-dropdown-menu {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.header-dropdown.open .header-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
}

.header-dropdown-menu {
    position: fixed;
    left: 0;
    top: calc(var(--btn-height) + var(--space-0));
    width: 100%;
    background-color: transparent;
    padding: var(--space-6) 0;
    z-index: var(--z-dropdown);
    padding-bottom: 0;
    border-bottom: 1px solid var(--border);
    opacity: 0 !important;
    transition: opacity 0.2s ease, transform 1s ease;
    pointer-events: none;
    max-height: 70vh;
    overflow-y: auto;

}

.header-dropdown-grid-wrapper {
    padding: var(--space-6) var(--space-4);
    padding-top: var(--space-4);
    width: calc(100% - var(--space-4) - var(--space-4));
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);

}

.header-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    width: calc(100% - var(--space-4) - var(--space-4));
    max-width: 1200px;
    margin: 0 auto;
}

.header-dropdown-item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    cursor: pointer;
    background-color: transparent;
}

.header-dropdown-icon {
    font-size: var(--fs-xl);
    color: var(--accent-alt);
    flex-shrink: 0;
    margin-top: 2px;
    transition: color var(--transition-fast);
}

.header-dropdown-item:hover {
    background: var(--card-bg-hover);
    border: 1px solid var(--accent);
}

.header-dropdown-item:hover .header-dropdown-icon {
    color: var(--accent);

}

.header-dropdown-item h4 {
    color: var(--muted);
    font-size: var(--fs-md);
    font-weight: 600;
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
}

.header-dropdown-item:hover.header-dropdown-item h4 {
    color: var(--fg);
}

.header-dropdown-item p {
    color: var(--muted);
    font-size: var(--fs-sm);
    margin: 0;
}

.notif-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    min-width: 16px;
    height: 20px;
    padding: 0 4px;
    line-height: 19px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-text-hover);
    background: var(--accent);
    /* blue */
    border-radius: 999px;
    text-align: center;
    pointer-events: none;
    border: 2px solid var(--accent-text-hover);
}

.notif-badge.hidden {
    display: none !important;
}

.notif-badge.dot {
    min-width: 10px;
    width: 10px;
    height: 10px;
    padding: 0;
    line-height: 10px;
    font-size: 0;
    border-radius: 50%;
}

.avatar-wrapper {
    display: flex;
    align-items: center;
}

.avatar-circle:hover {
    border: 2px solid var(--accent)
}

.avatar-circle {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}


.user-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}

.user-dropdown a:hover {
    background-color: var(--hover);
}

.user-menu.show .user-dropdown {
    display: block;
}

.hidden {
    display: none;
}

/* ------------------------ */
/* INTERACTIVE BACKGROUND */
/* ------------------------ */

#interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

#interactive-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--bg) 0%, var(--bg) 25%, rgba(0, 0, 0, 0.00) 110%);
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(0px) saturate(190%);
}

#interactive-bg .block {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0.8;
    transform: translateZ(0);
    will-change: transform, opacity;
    pointer-events: none;
    mix-blend-mode: lighten;
    z-index: 0;
}

/* ------------------------ */
/* HERO SECTION */
/* ------------------------ */

.hero {
    text-align: center;
    padding: var(--space-10) 0 var(--space-16) 0;
    padding-bottom: 0;
    min-height: calc(100vh - var(--btn-height) - var(--space-10) - 135px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .hero-preheader,
.hero .hero-subtext,
.hero .hero-actions {
    opacity: 0;
    animation-name: heroElementFadeInUp;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero .hero-preheader {
    animation-duration: 0.6s;
    animation-delay: 0.2s;
}

.hero .hero-subtext {
    animation-duration: 0.7s;
    animation-delay: 1.4s;
}

.hero .hero-actions {
    animation-duration: 0.6s;
    animation-delay: 1.7s;
}

.hero-preheader {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.hero-heading {
    position: relative;
    opacity: 0;
    z-index: 2;
    font-size: var(--fs-5xl);
    font-weight: 600;
    max-width: 800px;
    margin-bottom: var(--space-4);
    animation:
        heroElementFadeInUp 0.8s ease 0.6s forwards,
        fillHeadingGradient 1.2s ease-in-out 1.0s forwards;
    -webkit-text-fill-color: transparent;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: left center;
}

.hero-heading::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: var(--muted);
    -webkit-text-fill-color: transparent;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: strokeFade 2.2s ease-in-out 0.2s forwards;
}

.hero-subtext {
    font-size: var(--fs-md);
    color: var(--muted);
    max-width: 600px;
    margin: var(--space-8) auto;
    margin-bottom: var(--space-8);
    position: relative;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-10);
    position: relative;
}

/* ------------------------ */
/* TEXT UTILITIES */
/* ------------------------ */

.text-hilight {
    color: var(--accent);
    transition: color var(--transition-fast);
}

.text-muted-hilight {
    color: var(--muted);
    transition: color var(--transition-fast);
}

.logo:hover .text-muted-hilight {
    color: var(--fg);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: color var(--transition-fast);
}

.section-title {
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    font-weight: 600;
    margin-bottom: var(--space-6);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.custom-template-heading {
    line-height: 1.2;
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    font-weight: 600;
    text-align: left;
    margin-bottom: var(--space-6);
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

.heading-accent {
    color: var(--accent);
}

.heading-accent-alt {
    color: var(--accent-alt);
}

.section-label {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 0;
    font-weight: 600;
}

/* ------------------------ */
/* FEATURES SECTION */
/* ------------------------ */

.features-section .section-title {
    margin-top: var(--space-10);
    margin-bottom: var(--space-10);
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.feature-item {
    padding: var(--space-6);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-icon-wrapper {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    padding: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.feature-item:hover .feature-icon-wrapper {
    background-color: var(--muted-bg);
    border-color: var(--border-hover);
}

.feature-icon {
    font-size: var(--fs-3xl);
    color: var(--accent-alt);
}

.feature-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.feature-description {
    font-size: var(--fs-md);
    color: var(--muted);
}

/* Firework Effects */
.firework-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 10;
}

.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

.feature-free-to-use {
    cursor: pointer;
}

.feature-free-to-use.firework-active .feature-icon {
    animation: sparkle 0.6s ease-in-out;
}

.feature-free-to-use.firework-active .feature-icon-wrapper {
    animation: pulse-glow 0.8s ease-in-out;
}

/* ------------------------ */
/* TICKER SECTION */
/* ------------------------ */

.ticker {
    overflow: hidden;
    background-color: var(--header-bg);
    backdrop-filter: blur(5px);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.ticker-track {
    display: flex;
    width: fit-content;
    animation: scroll-left 80s linear infinite;
}

.ticker-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-right: var(--space-10);
    font-size: var(--fs-lg);
    color: var(--muted);
    gap: var(--space-2);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.ticker-item:hover {
    color: var(--fg);
}

.ticker-item .ti {
    font-size: var(--fs-xl);
    color: var(--muted);
}

/* ------------------------ */
/* DROPDOWN COMPONENTS */
/* ------------------------ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 10rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) 0;
    display: none;
    z-index: var(--z-dropdown);
}

.dropdown-menu a {
    display: block;
    padding: var(--space-2) var(--space-4);
    color: var(--fg);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.dropdown-menu a:hover {
    background-color: var(--muted-bg);
}

.dropdown.open>.dropdown-menu {
    display: block;
}

/* ------------------------ */
/* HOW IT WORKS SECTION */
/* ------------------------ */

.how-it-works {
    text-align: center;
    padding: var(--space-14) 0;
}

.how-it-works .section-title {
    margin-bottom: var(--space-10);
}

.how-it-works-accordion-container {
    display: flex;
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.accordion-titles {
    flex: 1;
    padding: var(--space-3);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    overflow-y: auto;
}

.accordion-title-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--muted);
    border: 1px solid transparent;
}

.accordion-title-item:hover {
    background-color: var(--muted-bg);
    color: var(--fg);
}

.accordion-title-item.active {
    background-color: var(--bg-alt);
    color: var(--fg);
    border-color: var(--accent);
}

.accordion-title-item .accordion-icon {
    font-size: var(--fs-xl);
    margin-left: var(--space-3);
    transition: transform var(--transition-fast);
    color: var(--muted);
}

.accordion-title-item.active .accordion-icon {
    transform: rotate(-180deg);
    color: var(--accent);
}

.accordion-content {
    flex: 2;
    padding: var(--space-6);
    padding-left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    align-items: center;
}

.accordion-content-item {
    position: absolute;
    top: var(--space-6);
    left: 0;
    right: var(--space-6);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition);
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-4);
    min-height: calc(100% - (var(--space-6) * 3));
    max-height: calc(100% - (var(--space-6) * 3));
    overflow-y: auto;
}

.accordion-content-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.accordion-content-item h3 {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--fg);
}

.accordion-content-item p {
    font-size: var(--fs-base);
    color: var(--muted);
    margin-bottom: 0;
}

.accordion-content-item .icon-box {
    color: var(--accent);
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-3xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--space-8);
    width: var(--space-8);
    flex-shrink: 0;
    margin-bottom: var(--space-4);
}

/* Timer Controls */
.timer-controls {
    position: absolute;
    bottom: var(--space-4);
    left: 0;
    right: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: var(--space-6);
    border-radius: var(--radius-full);
    padding: 0 var(--space-3);
    z-index: 10;
}

.timer-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0;
    transition: color var(--transition-fast);
}

.timer-btn .ti {
    font-size: var(--fs-md);
}

.timer-btn:hover {
    color: var(--fg);
}

.timer-bar-wrapper {
    flex: 1;
    height: 4px;
    background-color: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    border-radius: var(--radius-full);
    transition: width 0.1s linear;
}

/* ------------------------ */
/* TEMPLATES SECTION */
/* ------------------------ */

.templates-section {
    position: relative;
    padding: var(--space-14) 0;
    padding-bottom: var(--space-8);
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 auto;
    margin-bottom: var(--space-10);
    gap: var(--space-8);
    max-width: 1200px;
    padding: 0 var(--space-4);
}

.templates-title-section {
    flex: 1;
    max-width: 600px;
}

.templates-main-title {
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0;
}

.templates-description {
    padding-top: var(--space-4);
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
}

.templates-description p {
    font-size: var(--fs-base);
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.templates-carousel-container {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-8);
    padding: 0 var(--space-6);
}

.templates-carousel {
    display: flex;
    gap: var(--space-6);
    transition: transform 0.4s ease;
    width: fit-content;
}

.template-testimonial-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-decoration: none;
    color: var(--fg);
    transition: all var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
}

.template-testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 75%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
    pointer-events: none;
    opacity: 0.35;
}

.template-testimonial-card:hover::before {
    left: 150%;
}

.template-testimonial-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--card-bg-hover);
}

.template-avatar {
    width: var(--space-6);
    height: var(--space-6);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    transition: all var(--transition);
    position: relative;
    z-index: 2;
}

.template-avatar .ti {
    font-size: var(--fs-2xl);
    color: var(--template-accent-color);
}

.template-testimonial-card:hover .template-avatar {
    background-color: rgba(var(--template-accent-color), 0.1);
}

.template-info {
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 2;
}

.template-name {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: var(--space-1);
    line-height: 1.3;
}

.template-role {
    font-size: var(--fs-sm);
    color: var(--template-accent-color);
    margin: 0;
    font-weight: 500;
}

.template-content {
    position: relative;
    z-index: 2;
}

.template-content p {
    font-size: var(--fs-sm);
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.templates-navigation {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.nav-arrow {
    width: var(--space-10);
    height: var(--space-10);
    border-radius: var(--radius-full);
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
}

.nav-arrow:hover {
    background-color: var(--border);
    color: var(--fg);
    border-color: var(--border-hover);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-arrow:disabled:hover {
    background-color: var(--bg-alt);
    color: var(--muted);
    border-color: var(--border);
}

/* ------------------------ */
/* SHOWCASE SECTION */
/* ------------------------ */

.showcase-tooltip {
    position: fixed;
    z-index: var(--z-max);
    pointer-events: none;
    transform: translate(-50%, -150%);
    background: var(--tooltip);
    border: 1px solid var(--border-hover);
    backdrop-filter: blur(6px);
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
    color: var(--fg);
    border-radius: var(--radius-full);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 120ms ease;
}

.showcase-tooltip.active {
    opacity: 1;
}

.image-showcase-section {
    padding-bottom: var(--space-16);
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-showcase-container {
    max-width: 1300px;
    width: calc(100% - var(--space-16));
    perspective: 1200px;
    margin: 0 auto;
}

.header-image {
    will-change: transform;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
}

.hero-header-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: thin solid var(--card-bg-hover);
    background-color: var(--card-bg-hover);
    backdrop-filter: blur(5px);
}

.header-image-block {
    position: relative;
    z-index: 2;
    border-radius: var(--radius-lg);
    overflow: visible;
}

.header-image-block img {
    /* image-rendering: pixelated;
    image-rendering: crisp-edges;  */
}

.header-image-block::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: calc(var(--radius-lg) + 3px);
    background: conic-gradient(rgba(var(--image-glow), 0.4) 0deg, transparent 120deg, rgba(var(--image-glow), 0.5) 240deg, transparent 360deg);
    filter: blur(8px);
    animation: spinGlow 8s linear infinite;
    z-index: -1;
    pointer-events: none;
    opacity: 0.2;
}

.hero-header-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    border: thin solid var(--border);
}

/* ------------------------ */
/* TOOL SWITCHER SECTION */
/* ------------------------ */

.tool-slides-container {
    position: relative;
    min-height: 380px;
    padding: var(--space-10) 0;
    display: flex;
    align-items: center;
}

.tool-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) 0;
}

.tool-slide.active-tool {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.tool-content-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-4);
}

.tool-details {
    max-width: 600px;
}

.tool-title {
    font-size: clamp(var(--fs-xl), 4vw, var(--fs-3xl));
    font-weight: 600;
    margin-bottom: var(--space-4);
    line-height: 1.3;
    color: var(--fg);
}

.tool-details p {
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--muted);
}

.tool-details strong {
    color: var(--fg);
}

.tool-visual {
    width: 90px;
    height: 90px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: radial-gradient(circle at center, rgba(var(--image-glow), 0.1) 0%, transparent 60%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.tool-visual:hover {
    transform: scale(1.05);
    background-color: rgba(var(--image-glow), 0.15);
}

.tool-visual--ai {
    background: radial-gradient(circle at center, rgba(var(--image-glow), 0.15) 0%, transparent 70%);
}

.tool-content-panel:hover .tool-visual--ai::before,
.tool-visual--ai:hover::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: pulse-wave 1.5s ease-out infinite;
    z-index: -1;
}

.tool-visual--ai::after {
    content: "";
    position: absolute;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 70% 30%, #6c5ce7 0, #6c5ce7 7px, transparent 7px),
        radial-gradient(circle at 30% 70%, #8c7ae6 0, #8c7ae6 7px, transparent 7px),
        radial-gradient(circle at 70% 70%, #a29bfe 0, #a29bfe 7px, transparent 7px),
        radial-gradient(circle at 30% 30%, #5352ed 0, #5352ed 7px, transparent 7px);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.tool-content-panel:hover .tool-visual--ai::after,
.tool-visual--ai:hover::after {
    animation: rotate-dots 3s linear infinite;
}

.tool-visual--color-picker {
    background-color: rgba(250, 110, 250, 0.08);
}

.tool-visual--color-picker .ti {
    font-size: 3rem;
    color: #ff72ff;
}

.tool-visual--devtools {
    background-color: rgba(223, 223, 42, 0.08);
}

.tool-visual--devtools .ti {
    font-size: 3rem;
    color: #ffe367;
}

.tool-visual--terminal {
    background-color: rgba(0, 255, 255, 0.08);
}

.tool-visual--terminal .ti {
    font-size: 3rem;
    color: #00cccc;
}

.tool-visual--project-manager {
    background-color: rgba(0, 119, 255, 0.08);
}

.tool-visual--project-manager .ti {
    font-size: 3rem;
    color: #045af8;
}

.tool-visual--gallery {
    background-color: rgba(153, 102, 255, 0.08);
}

.tool-visual--gallery .ti {
    font-size: 3rem;
    color: #9966ff;
}

.gallery-preview-area {
    margin: 0 auto;
    margin-top: var(--space-8);
    padding: var(--space-4);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    min-height: 80px;
    width: 100%;
    max-width: 500px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-preview-area p {
    margin: 0;
}

.tool-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-6);
    padding-bottom: var(--space-14);
}

.tool-nav-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    font-size: 0;
    line-height: 0;
}

.tool-nav-dot:hover {
    background-color: var(--muted);
    transform: scale(1.1);
}

.tool-nav-dot.tool-nav-dot--active {
    background-color: var(--accent);
    transform: scale(1.2);
}

/* ------------------------ */
/* FINAL CTA SECTION */
/* ------------------------ */

.final-cta-section {
    padding: var(--space-12) 0 var(--space-16) 0;
    position: relative;
    z-index: 2;
}

.final-cta-block {
    max-width: 960px;
    margin: 0 auto;
    background-color: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.final-cta-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--image-glow), 0.08) 0%, transparent 40%);
    animation: spinGlow 15s linear infinite reverse;
    z-index: -1;
    opacity: 1.7;
}

.final-cta-block-dynamic {
    padding: var(--space-8) var(--space-6);
}

.final-cta-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-8);
}

.final-cta-info-panel {
    flex: 1.5;
    min-width: 300px;
    text-align: left;
}

.final-cta-icon-header_dynamic {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.final-cta-icon-header_dynamic .final-cta-icon-accent {
    margin: 0;
    width: 60px;
    height: 60px;
}

.final-cta-icon-header_dynamic .final-cta-icon-accent i.ti-sparkles {
    font-size: 2.2rem;
}

.final-cta-icon-header_dynamic .section-label {
    margin-bottom: 0;
}

.final-cta-info-panel .final-cta-headline {
    font-size: clamp(var(--fs-xl), 4.5vw, var(--fs-3xl));
    color: var(--fg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    line-height: 1.25;
}

.final-cta-info-panel .final-cta-description {
    font-size: var(--fs-md);
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.6;
    max-width: none;
}

.final-cta-actions-panel {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    align-items: flex-start;
    justify-content: center;
}

.final-cta-actions-panel .btn {
    width: calc(100% - var(--space-10));
    max-width: calc(100% - var(--space-10));
    min-width: unset;
    text-align: center;
}

.final-cta-actions-panel .btn i {
    margin-right: var(--space-2);
    font-size: var(--fs-md);
}

.final-cta-icon-accent {
    border-radius: var(--radius-full);
    background: radial-gradient(circle at center, rgba(var(--accent-alt-rgb, 113, 211, 203), 0.15) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.final-cta-icon-accent i.ti-sparkles {
    color: var(--accent-alt);
    transition: color 0.3s ease;
}

.final-cta-block:hover .final-cta-icon-accent {
    transform: scale(1.1);
    background: radial-gradient(circle at center, rgba(var(--accent-rgb, 60, 127, 252), 0.2) 0%, transparent 70%);
}

.final-cta-block:hover .final-cta-icon-accent i.ti-sparkles {
    color: var(--accent);
}

/* ------------------------ */
/* FOOTER */
/* ------------------------ */

.site-footer {
    background-color: var(--header-bg);
    backdrop-filter: blur(5px);
    color: var(--muted);
    padding: var(--space-10) 0 var(--space-6) 0;
    border-top: 1px solid var(--border);
    font-size: var(--fs-sm);
    position: relative;
    z-index: 2;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: var(--space-8) var(--space-6);
    margin-bottom: var(--space-8);
}

.footer-column h4 {
    font-size: var(--fs-base);
    color: var(--fg);
    margin-bottom: var(--space-5);
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: var(--space-3);
}

.footer-column ul li:last-child {
    margin-bottom: 0;
}

.footer-column ul li a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--fg);
}

.footer-brand .logo {
    margin-bottom: var(--space-4);
    display: inline-block;
    margin-right: 0;
}

.footer-brand .logo .text-muted-hilight {
    color: var(--muted);
}

.footer-brand .logo:hover .text-muted-hilight {
    color: var(--fg);
}

.footer-brand p {
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.footer-subscribe p {
    margin-bottom: var(--space-4);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    margin-top: var(--space-2);
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background-color: var(--button);
    color: var(--fg);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--accent);
    background-color: var(--bg);
}

.newsletter-form button {
    padding: var(--space-3) var(--space-4);
    background-color: var(--accent);
    color: var(--button);
    border: 1px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.newsletter-form button:hover {
    background-color: var(--fg);
    color: var(--accent-text);
    border-color: var(--fg);
}

.newsletter-form button .ti {
    font-size: var(--fs-md);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6);
    padding-bottom: var(--space-10);
    /* border-top: 1px solid var(--border); */
    gap: var(--space-4);
}

.footer-copyright {
    color: var(--muted);
    font-size: var(--fs-xs);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.footer-socials a {
    color: var(--muted);
    font-size: var(--fs-lg);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a:hover {
    color: var(--accent);
    background-color: var(--border);
}

.footer-legal {
    display: flex;
    gap: var(--space-5);
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
    font-size: var(--fs-xs);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--fg);
}

/* ------------------------ */
/* RESPONSIVE DESIGN */
/* ------------------------ */

@media (max-width: 992px) {
    .templates-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-6);
    }

    .templates-description {
        max-width: none;
    }

    .footer-brand {
        grid-column: span 2 / auto;
    }

    .footer-subscribe {
        grid-column: span 2 / auto;
    }
}

@media (max-width: 768px) {
    .hero-heading {
        font-size: var(--fs-3xl);
    }

    .hero-subtext {
        font-size: var(--fs-base);
    }

    .how-it-works-accordion-container {
        flex-direction: column;
        min-height: auto;
        border: none;
        background-color: transparent;
        backdrop-filter: none;
        gap: 0;
    }

    .accordion-titles {
        border-right: none;
        border-bottom: none;
        padding: var(--space-4) 0;
        gap: var(--space-2);
    }

    .accordion-title-item {
        border: 1px solid var(--border);
        margin-bottom: var(--space-2);
        background-color: var(--card-bg);
        backdrop-filter: blur(5px);
        padding: var(--space-3);
    }

    .accordion-title-item.active {
        background-color: var(--bg-alt);
        border-color: var(--accent);
    }

    .accordion-title-item:hover {
        background-color: var(--bg-alt);
    }

    .accordion-title-item .accordion-icon {
        transform: rotate(0deg);
    }

    .accordion-title-item.active .accordion-icon {
        transform: rotate(-180deg);
    }

    .accordion-content {
        padding: var(--space-4);
        padding-left: 0;
        max-height: 0;
        transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
        overflow: hidden;
        display: block;
        position: static;
    }

    .accordion-content.active {
        max-height: 500px;
        opacity: 1;
        padding-top: 0;
    }

    .accordion-content-item {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: none;
        overflow-y: visible;
    }

    .timer-controls {
        display: none;
    }

    .template-testimonial-card {
        min-width: 280px;
        max-width: 280px;
        padding: var(--space-5);
    }

    .templates-main-title {
        font-size: var(--fs-3xl);
    }

    .tool-content-panel {
        gap: var(--space-4);
        padding: var(--space-2) var(--space-4);
    }

    .tool-visual {
        width: 70px;
        height: 70px;
    }

    .tool-title {
        font-size: clamp(var(--fs-lg), 3.5vw, var(--fs-2xl));
    }

    .tool-details p {
        font-size: var(--fs-sm);
    }

    .tool-slides-container {
        min-height: 400px;
    }

    .final-cta-layout-wrapper {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
    }

    .final-cta-info-panel {
        text-align: center;
        flex-basis: 100%;
    }

    .final-cta-icon-header_dynamic {
        justify-content: center;
    }

    .final-cta-actions-panel {
        align-items: center;
        flex-basis: 100%;
    }

    .final-cta-actions-panel .btn {
        width: auto;
        min-width: 220px;
    }

    .site-footer {
        padding-top: var(--space-8);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6) var(--space-5);
    }

    .footer-brand,
    .footer-subscribe {
        grid-column: 1 / -1;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand .logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
        max-width: 400px;
    }

    .newsletter-form {
        margin-left: auto;
        margin-right: auto;
        max-width: 400px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-5);
    }

    .footer-socials {
        order: -1;
        margin-bottom: var(--space-2);
    }

    .footer-legal {
        gap: var(--space-4);
    }
}

@media (max-width: 480px) {
    .templates-header {
        margin-bottom: var(--space-6);
    }

    .templates-main-title {
        font-size: var(--fs-2xl);
    }

    .template-avatar {
        width: var(--space-10);
        height: var(--space-10);
    }

    .template-avatar .ti {
        font-size: var(--fs-xl);
    }

    .template-testimonial-card {
        min-width: 260px;
        max-width: 260px;
    }

    .templates-carousel {
        gap: var(--space-4);
    }

    .tool-slides-container {
        min-height: 420px;
    }

    .tool-title {
        font-size: var(--fs-lg);
    }

    .final-cta-block-dynamic {
        padding: var(--space-6) var(--space-4);
    }

    .final-cta-info-panel .final-cta-headline {
        font-size: var(--fs-xl);
    }

    .final-cta-actions-panel .btn {
        width: 100%;
        min-width: unset;
    }

    .site-footer {
        padding: var(--space-6) var(--space-2);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        text-align: center;
    }

    .footer-column h4 {
        margin-top: 0;
        margin-bottom: var(--space-4);
    }

    .footer-column:not(:first-child) {
        margin-top: var(--space-4);
    }

    .footer-column ul li a {
        padding: var(--space-1) 0;
    }

    .footer-legal {
        flex-direction: column;
        gap: var(--space-2);
    }
}


/* ------------  large screens ------------- */


@media (max-width: 870px) {
    .logo {
        margin-right: var(--space-4);
    }

    .nav ul {

        gap: var(--space-4);
    }
}

@media (max-width: 768px) {
    .header-dropdown:hover>.header-dropdown-menu {
        display: none;
    }

    .header-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: transparent;
        padding: 0;
        border: none;
    }

    .header-dropdown.open>.header-dropdown-menu {
        display: block;
        opacity: 1 !important;
        pointer-events: auto;
    }

    .header-dropdown-grid-wrapper {
        padding: 0;
        background: none;
    }

    .header-dropdown-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
    }

    .header-dropdown-item {
        border-radius: var(--radius);
        padding: var(--space-3) var(--space-4);
        background: var(--bg-alt);
    }

    .header-dropdown-item:hover {
        background: var(--muted-bg);
    }

    .header-dropdown-item p {
        display: none;
    }

}

.theme-toggle-btn {
    background: none;
    border: none;
    font-size: var(--fs-xl);
    color: var(--fg);
    cursor: pointer;
    padding: var(--space);
    z-index: var(--z-fixed);
    margin: 0 var(--space-3);
    margin-right: 0;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: var(--fs-xl);
    color: var(--fg);
    cursor: pointer;
    padding: var(--space);
    z-index: var(--z-fixed);
    margin: 0 var(--space-3)
}

.hamburger:hover,
.theme-toggle-btn:hover {
    color: var(--accent);

}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .theme-toggle-btn {
        margin-left: auto;
    }

    .logo {
        display: none;
        margin-right: var(--space-3);
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--header-bg);
        display: none;
        flex-direction: column;
        gap: 0;
        padding: var(--space-4);
        border-bottom: 1px solid var(--border);
    }

    .nav.open {
        display: flex;
    }

    .nav ul {
        flex-direction: column;
        gap: var(--space-2);
    }

    .user-controls {
        display: none;
    }
}


/* ------------------------ */
/* PUBLIC PROJECTS SECTION */
/* ------------------------ */
.project-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.author-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-handle {
    color: var(--muted);
    font-size: var(--fs-xs);
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-name {
    font-weight: 600;
    font-size: var(--fs-md);
    color: var(--fg);
    line-height: 1.2;
    /* max-width: calc(100% - 125px); */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted-bg);
    color: var(--muted);
    font-size: 1.25rem;
}


.page-title {
    margin: var(--space-8) 0;
    color: var(--muted);
    text-align: center;
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-3xl));
    font-weight: 600;
    display: none;
}

.projects-container {
    max-width: calc(100% - 2px);
    /* max-width: 1600px; */
    margin: 0 auto;
    padding: 1px;
    padding-top: 1px;
    padding-bottom: var(--space-14);
    position: relative;
    z-index: 2;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 15px;
}

.project-card {
    background: var(--bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}


.project-card:hover {
    /* border: 1px solid var(--muted); */
    box-shadow: var(--color-box-shadow)
        /* transform: translateY(-4px); */
}

/* Header Section */
.project-header {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    /* background-color: var(--card-bg-hover); */
    justify-content: center;
    align-items: center;
    display: flex;
}

.project-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    opacity: 1;
    transform: scale(1.5);
    display: none;
}

.project-cover {
    position: relative;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    object-fit: cover;
    z-index: 2;
    margin: auto;
    border-radius: 8px;

}

.project-image-container:hover .project-cover {
    transform: zoom(1.5);
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3rem;
}

.fork-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 10;
}

.template-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.tech-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    display: none;
}

/* Tech badge colors */
.tech-badge.javascript {
    background: #f7df1e;
    color: #000;
}

.tech-badge.python {
    background: #3776ab;
    color: white;
}

.tech-badge.react {
    background: #61dafb;
    color: #000;
}

.tech-badge.vue {
    background: #4fc08d;
    color: white;
}

.tech-badge.html {
    background: #e34f26;
    color: white;
}

.tech-badge.css {
    background: #1572b6;
    color: white;
}

.tech-badge.nodejs {
    background: #339933;
    color: white;
}

.tech-badge {
    background: #6b7280;
    color: white;
}

/* default */

/* Content Section */
.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 5px 15px;
    padding-bottom: 0;
}

.project-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}

.author-link:hover .author-avatar {
    border-color: var(--accent);
    ;
}

.author-details {
    flex: 1;
    min-width: 0;
    margin-top: -8px;
}

.project-card .project-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card .author-handle {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.project-card .author-handle:hover {
    color: var(--color-href);
}

.project-card .project-description {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .project-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.meta-icon {
    font-size: 14px;
}

/* Footer Section */
.project-card .project-footer {
    padding: 15px 15px;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--muted);
}

.like-btn:hover {
    border-color: var(--color-error);
    color: var(--color-error);
    background: var(--bg-alt);
}

.like-btn.liked {
    border-color: var(--color-error);
    color: var(--color-error);
    background: var(--bg-alt);
}

.like-btn.liked i {
    color: var(--color-error);
}

.preview-project-btn {
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;

}

.preview-project-btn:hover {
    border: 1px solid var(--border-hover);

    color: var(--fg);
}

.project-card:hover .open-project-btn {
    border-color: var(--border-hover);
    color: var(--fg);
}

.open-project-btn {
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-left: auto;
}

.open-project-btn:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--accent-text-hover) !important;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 480px) {
    .project-card {
        margin: 1rem;
        max-width: none;
    }

    .project-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .open-project-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

.loading-projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: var(--space-4);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.empty-icon,
.error-icon {
    font-size: 4rem;
    opacity: 0.6;
}

.empty-state h3,
.error-state h3 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 600;
}

.empty-state p,
.error-state p {
    margin: 0;
    color: var(--muted);
    font-size: var(--fs-sm);
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;

    }

    .project-card-header {
        height: 160px;
    }

    .project-info {
        padding: var(--space-4);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

@keyframes templateGlow {

    0%,
    100% {
        box-shadow: var(--shadow-md);
    }

    50% {
        box-shadow: 0 0 20px rgba(245, 87, 108, 0.4);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}




















.iframe-viewer {
    position: fixed;
    bottom: 0px;
    right: 0px;
    width: 50%;
    height: calc(100% - 80px);
    /* height: 70%; */
    /* height: auto;
    aspect-ratio: 16/9; */
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-hover);
    max-width: calc(100vw - 2px);

    max-height: calc(100vh - 2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: auto;
    z-index: 1000;
    transition: box-shadow 0.2s;
}

.iframe-viewer:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.iframe-viewer-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
    cursor: move;
}

.iframe-viewer-header {
    background: var(--button);
    color: var(--fg);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    cursor: move;
    border-bottom: 1px solid var(--border-hover);
}

.iframe-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    gap: 8px;
}

.viewer-left-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-md);
    color: var(--muted);
    white-space: nowrap;
}

.viewer-left-info {
    flex: 1;
    min-width: 0;
}

.viewer-project-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    /* adjust to your layout */
    display: inline-block;
}

.viewer-editor-btn {
    background-color: var(--button);
    color: var(--muted);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border-color: transparent;
    text-decoration: none;
    font-size: var(--fs-xs);
    transition: background 0.2s;
    outline: thin solid var(--border-hover);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viewer-editor-btn:hover {
    outline: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.iframe-viewer-header .controls {
    display: flex;
    gap: 6px;
    margin-left: auto;
    margin-right: 10px;
    cursor: pointer !important;
}

.iframe-viewer-header.fullscreen {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.iframe-viewer-header button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.iframe-viewer-header button:hover {
    color: var(--fg);
    background-color: var(--border);
    border-color: var(--border-hover);
}

.iframe-viewer-header i {
    pointer-events: none;
}

.iframe-viewer-frame {
    flex-grow: 1;
    width: 100%;
    border: none;
}

.iframe-viewer.fullscreen {
    position: fixed !important;
    top: 78px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    resize: none !important;
    z-index: 9999;
    max-width: calc(100vw - 4px);
    max-height: calc(100vh - 4px);
}

@media (max-width:760px) {
    .iframe-viewer {
        min-width: 100%;
    }
}

@media (max-width:600px) {
    .iframe-viewer {
        min-width: 100%;
    }

    .iframe-viewer-header .controls>button:nth-child(2),
    .iframe-viewer-header .controls>button:nth-child(3) {
        display: none;
    }

    .viewer-project-label,
    .viewer-left-info button {
        display: none;
    }
}

/* --------------- custom resize handles --------------- */
.iframe-viewer {
    /* stop the native handle   */
    resize: none;
    overflow: hidden;
    /* let the iframe scroll itself */
}

/* shared handle styles */
.resize-handle {
    position: absolute;
    z-index: 4;
    background: transparent;
    /* larger hit area */
}

/* edge handles (12 px thick strips) */
.resize-n,
.resize-s {
    height: 12px;
    width: 100%;
    left: 0;
}

.resize-n {
    top: -6px;
    cursor: n-resize;
}

.resize-s {
    bottom: -6px;
    cursor: s-resize;
}

.resize-e,
.resize-w {
    width: 12px;
    height: 100%;
    top: 0;
}

.resize-e {
    right: -6px;
    cursor: e-resize;
}

.resize-w {
    left: -6px;
    cursor: w-resize;
}

/* corner handles (16 × 16 squares) */
.resize-ne,
.resize-nw,
.resize-se,
.resize-sw {
    width: 16px;
    height: 16px;
}

.resize-ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.resize-nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.resize-se {
    bottom: -8px;
    right: -8px;
    cursor: nwse-resize;
}

.resize-sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.resize-handle::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(0, 102, 255, 0);
    border-radius: 2px;
}

.resize-handle:hover::after {
    background: rgba(0, 102, 255, 0.5);
}












.search-container {
    position: relative;
    max-width: 1200px;
    margin: var(--space-4) auto;
    margin-top: 0;
    width: calc(100% - var(--space-2) - var(--space-2));
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.1s ease;
    background: var(--bg);
    color: var(--fg);
    box-sizing: border-box;
    font-family: var(--font-ui);
}

.search-input:focus {
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    pointer-events: none;
    opacity: 0.5;
}

.search-input:focus+.search-icon {
    color: var(--fg);
    opacity: 1;
}

.search-clear-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.search-clear-icon:hover {
    opacity: 1;
}

.auth-header {
    padding-left: 100px !important;
}