:root {
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --accent: #00f2fe;
    --accent-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    /* Dark background to make the glass effect pop */
    overflow-x: hidden;
    min-height: 100vh;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove padding-top: 72px here for clarity, instead use .main-content */
    /* padding-top: 72px; */
}

/* ================= STANDARDIZED SPAC2 BRAND HEADER ================= */
.btn-back {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 18px;
    padding: 0;
    box-sizing: border-box;
}

.btn-back i,
.btn-back svg {
    color: #ffffff !important;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
    transform: translateX(-2px);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-back:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 0.85;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.brand-link:hover {
    opacity: 0.92;
}

.brand-logo-card {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    padding: 3.5px;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}

.brand-link:hover .brand-logo-card {
    transform: scale(1.04);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.brand-text {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    white-space: nowrap;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 19px;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1;
}

.brand-divider {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0.7;
    user-select: none;
}

.brand-app {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: -0.01em;
    line-height: 1;
}

@media (max-width: 640px) {
    .btn-back {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 16px;
    }

    .brand-logo-card {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        padding: 3px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-divider {
        font-size: 13px;
    }

    .brand-app {
        font-size: 13px;
    }
}

/* Moving Background Blobs */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1e293b, #000);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #195DCF;
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #06b6d4;
    animation-duration: 30s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #d946ef;
    animation-duration: 22s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(50px, 50px) rotate(20deg);
    }
}

/* Liquid Glass Card Style */
.liquid-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

/* Glossy Shine Effect */
.liquid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    transition: 0.5s;
}

.input-area textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.input-area textarea:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* Button Styling */
.btn-liquid {
    background: var(--accent-grad);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: transform 0.2s;
}

.btn-liquid:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.6);
}

.btn-liquid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    z-index: -1;
}

/* Modal */
.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Pointer Triangle */
.pointer-arrow {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 25px solid #fff;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    position: absolute;
    right: -10px;
    /* Adjust based on canvas */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Remove padding-top from body on all screens, use .main-content instead */
/* Padding for main when header present */
/* @media (min-width: 0px) {
            body { padding-top: 72px; }
        } */
@media (min-width: 0px) {
    .main-content {
        padding-top: 88px;
    }

    /* 64px header + 24px spacing */
}

@media (min-width: 768px) {
    .main-content {
        padding-top: 96px;
    }

    /* Larger space for desktop */
}