:root {
    --cooler-bg: #07111f;
    --cooler-surface: rgba(12, 24, 41, 0.88);
    --cooler-surface-strong: #0e1d32;
    --cooler-border: rgba(137, 170, 215, 0.18);
    --cooler-border-active: rgba(108, 221, 255, 0.55);
    --cooler-text: #eaf1ff;
    --cooler-muted: #97a8c4;
    --cooler-accent-a: #67e8f9;
    --cooler-accent-b: #8b5cf6;
    --cooler-accent-c: #22c55e;
    --cooler-shadow: 0 30px 80px rgba(3, 9, 20, 0.45);
}

.cooler-page {
    position: relative;
    overflow: hidden;
    padding: 120px 0 100px;
    background:
        radial-gradient(circle at top left, rgba(103, 232, 249, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 28%),
        linear-gradient(180deg, #081221 0%, #0b1628 48%, #0f1b30 100%);
}

.cooler-page::before,
.cooler-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.45;
    pointer-events: none;
}

.cooler-page::before {
    width: 280px;
    height: 280px;
    top: 90px;
    left: -80px;
    background: rgba(34, 197, 94, 0.15);
}

.cooler-page::after {
    width: 320px;
    height: 320px;
    right: -110px;
    bottom: 70px;
    background: rgba(139, 92, 246, 0.16);
}

.cooler-shell {
    position: relative;
    z-index: 1;
}

.cooler-intro {
    max-width: none;
    width: 100%;
    margin-bottom: 34px;
}

.cooler-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 9px 16px;
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.42);
    color: var(--cooler-accent-a);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cooler-page h1,
.cooler-page h2,
.cooler-page h3,
.cooler-page p,
.cooler-page label,
.cooler-page small,
.cooler-page span {
    color: var(--cooler-text);
}

.cooler-title {
    margin: 0 0 14px;
    font-size: 48px;
    line-height: 1.08;
}

.cooler-summary {
    max-width: none;
    margin: 0;
    color: var(--cooler-muted);
    font-size: 18px;
    line-height: 1.7;
}

.cooler-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px;
    align-items: stretch;
}

.cooler-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 28px;
    border: 1px solid var(--cooler-border);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(19, 33, 55, 0.92) 0%, rgba(10, 20, 36, 0.92) 100%);
    box-shadow: var(--cooler-shadow);
    backdrop-filter: blur(18px);
}

.cooler-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.cooler-panel-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.cooler-panel-note {
    display: block;
    margin-top: 8px;
    color: var(--cooler-muted);
    font-size: 14px;
    line-height: 1.6;
}

.cooler-field {
    width: 100%;
    min-height: 420px;
    padding: 22px 22px 24px;
    border: 1px solid var(--cooler-border);
    border-radius: 22px;
    background: rgba(4, 11, 21, 0.66);
    color: var(--cooler-text);
    font-size: 16px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.cooler-field::placeholder {
    color: rgba(151, 168, 196, 0.86);
}

.cooler-field:focus {
    outline: none;
    border-color: var(--cooler-border-active);
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.16);
    background: rgba(8, 16, 29, 0.78);
}

#coolerOutput {
    flex: 1;
}

.cooler-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
}

.cooler-actions-mobile {
    display: none;
}

.cooler-button,
.cooler-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cooler-button {
    min-width: 250px;
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--cooler-accent-a) 0%, var(--cooler-accent-b) 55%, #ec4899 100%);
    color: #07111f;
    font-size: 16px;
    box-shadow: 0 20px 45px rgba(57, 103, 202, 0.32);
}

.cooler-button:hover,
.cooler-copy:hover {
    transform: translateY(-1px);
}

.cooler-button:disabled,
.cooler-copy:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cooler-copy {
    padding: 12px 18px;
    background: rgba(103, 232, 249, 0.12);
    color: var(--cooler-text);
    border: 1px solid rgba(103, 232, 249, 0.24);
    box-shadow: 0 14px 32px rgba(4, 11, 21, 0.26);
}

.cooler-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(7, 17, 31, 0.22);
    border-top-color: #07111f;
    border-radius: 50%;
    animation: cooler-spin 0.8s linear infinite;
    display: none;
}

.cooler-button.is-loading .cooler-spinner {
    display: inline-block;
}

.cooler-button.is-loading .cooler-button-text::after {
    content: "...";
}

.cooler-status {
    margin-top: 18px;
    color: var(--cooler-muted);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    min-height: 24px;
}

.cooler-status.is-error {
    color: #fda4af;
}

.cooler-status.is-success {
    color: #86efac;
}

.cooler-output-wrap {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
}

@keyframes cooler-spin {
    to {
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 991px) {
    .cooler-page {
        padding: 100px 0 80px;
    }

    .cooler-title {
        font-size: 40px;
    }

    .cooler-grid {
        grid-template-columns: 1fr;
    }

    .cooler-field {
        min-height: 320px;
    }
}

@media only screen and (max-width: 767px) {
    .cooler-page {
        padding: 80px 0 70px;
    }

    .cooler-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .cooler-title {
        font-size: 30px;
        line-height: 1.12;
    }

    .cooler-summary {
        font-size: 16px;
    }

    .cooler-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cooler-button {
        width: 100%;
        min-width: 0;
    }

    .cooler-actions-desktop {
        display: none;
    }

    .cooler-actions-mobile {
        display: flex;
        margin-top: 20px;
    }

    .cooler-actions {
        margin-top: 22px;
    }
}
