:root {
    --drawer-width: 30%;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0a0a0a;
}

/* Canvas area — starts full-width, shifts right when drawer opens */
.canvas-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
}

/* Scanline overlay — matches canvas area */
.scanlines {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.25) 50%),
        linear-gradient(90deg, rgba(255,0,0,0.06), rgba(0,255,0,0.02), rgba(0,0,255,0.06));
    background-size: 100% 2px, 3px 100%;
}

/* Left Drawer */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--drawer-width);
    height: 100%;
    background-color: #111214;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 10;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.5s ease;
    display: flex;
    flex-direction: column;
}

body.drawer-open .drawer {
    transform: translateX(0);
    opacity: 1;
}

body.drawer-opening .drawer {
    transform: translateX(0);
    opacity: 1;
}

.drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 4.5rem 2.75rem 3.5rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Logo */
/* Hero section */
.drawer-hero {
    margin-top: auto;
    margin-bottom: 3rem;
}

.drawer-title {
    font-family: 'Inter', 'Inter Placeholder', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.40em;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    white-space: normal;
    text-wrap: balance;
}

.drawer-emphasis {
    color: rgba(255, 255, 255, 1);
    font-weight: 700;
}

.drawer-accent-italic {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.82);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.12em;
    color: rgba(255, 255, 255, 0.94);
}

.drawer-highlight {
    background-color: rgba(255, 255, 255, 0.88);
    color: #111214;
    padding: 0 0.2em;
    border-radius: 4px;
    display: inline-block;
    font-weight: 700;
}

.drawer-description {
    font-family: 'Inter', 'Inter Placeholder', sans-serif;
    font-size: 1.06rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.7em;
    letter-spacing: 0;
    margin: 0;
    font-weight: 400;
    max-width: 32rem;
}

/* Input area — full bleed */
.drawer-input-area {
    margin: 0 -2.75rem 0;
}

.drawer-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.875rem 2.5rem;
    transition: background 0.25s ease;
}

.drawer-input-wrapper:hover {
    background: rgba(255, 255, 255, 0.06);
}

.drawer-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.07);
}

.drawer-input {
    flex: 1;
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', 'Inter Placeholder', sans-serif;
    font-size: 1.28rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 1.05rem 0;
    cursor: text;
}

.drawer-input-field {
    position: relative;
    flex: 1;
    width: 100%;
}

.drawer-input::placeholder {
    color: transparent;
}

.drawer-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.drawer-input-placeholder {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    white-space: nowrap;
    font-family: 'Inter', 'Inter Placeholder', sans-serif;
    font-size: 1.28rem;
    font-weight: 400;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.46);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.28) 18%,
        rgba(255, 255, 255, 0.4) 34%,
        rgba(255, 255, 255, 0.64) 46%,
        rgba(255, 255, 255, 0.82) 50%,
        rgba(255, 255, 255, 0.64) 54%,
        rgba(255, 255, 255, 0.4) 66%,
        rgba(255, 255, 255, 0.28) 82%,
        rgba(255, 255, 255, 0.22) 100%
    );
    background-size: 260% 100%;
    background-position: 120% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: drawer-placeholder-glow 2.8s linear infinite;
}

.drawer-input:focus + .drawer-input-placeholder,
.drawer-input:not(:placeholder-shown) + .drawer-input-placeholder {
    opacity: 0;
}

@keyframes drawer-placeholder-glow {
    0% {
        background-position: 120% 50%;
    }
    35% {
        background-position: 26% 50%;
    }
    65% {
        background-position: -4% 50%;
    }
    100% {
        background-position: -60% 50%;
    }
}

.drawer-send-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #111214;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.drawer-send-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* Action items — full bleed, flat rows */
.drawer-actions {
    display: flex;
    flex-direction: column;
    margin: 0 -2.75rem 0;
    margin-bottom: auto;
    border-top: none;
}

.drawer-action-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.9rem;
    padding: 1.8rem 2.5rem;
    border: none;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', 'Inter Placeholder', sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    background: transparent;
    text-decoration: none;
}

.drawer-action-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.drawer-action-icon {
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.drawer-action-item:hover .drawer-action-icon {
    opacity: 0.85;
}

@media (max-width: 1200px) {
    :root {
        --drawer-width: 38%;
    }

    .drawer-content {
        padding: 3.5rem 2.25rem 2.75rem;
    }

    .drawer-title {
        font-size: 2rem;
    }

    .drawer-description {
        font-size: 1rem;
    }

    .drawer-input-area,
    .drawer-actions {
        margin-left: -2.25rem;
        margin-right: -2.25rem;
    }

    .drawer-input-wrapper,
    .drawer-action-item {
        padding-left: 2.25rem;
        padding-right: 2.25rem;
    }
}

@media (max-width: 900px) {
    :root {
        --drawer-width: 44%;
    }

    .drawer-content {
        padding: 3rem 1.75rem 2rem;
    }

    .drawer-hero {
        margin-bottom: 2.25rem;
    }

    .drawer-title {
        font-size: 1.8rem;
        line-height: 1.12;
    }

    .drawer-description {
        font-size: 0.96rem;
        line-height: 1.55;
    }

    .drawer-input-area,
    .drawer-actions {
        margin-left: -1.75rem;
        margin-right: -1.75rem;
    }

    .drawer-input-wrapper {
        padding: 0.85rem 1.75rem;
    }

    .drawer-input {
        font-size: 1.08rem;
        padding: 0.9rem 0;
    }

    .drawer-send-btn {
        width: 48px;
        height: 48px;
    }

    .drawer-action-item {
        padding: 1.4rem 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .canvas-area {
        position: fixed;
        top: auto;
        left: 0;
        width: 100%;
        height: 100%;
        transition: none;
    }

    body.drawer-open .canvas-area {
        left: 0;
        width: 100%;
    }

    .drawer {
        display: none;
    }
}

@media (max-width: 420px) {
    .canvas-area {
        height: 100%;
    }
}
