* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top, rgba(245, 158, 11, 0.22), transparent 35%),
        linear-gradient(135deg, #07111f 0%, #0f1f33 48%, #132b43 100%);
    color: #f6f7fb;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-shell,
.dashboard-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
    position: relative;
}

.auth-shell {
    display: grid;
    gap: 28px;
    padding-top: 44px;
    padding-bottom: 56px;
}

.auth-intro h1,
.dashboard-header h1 {
    margin: 12px 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
}

.auth-intro p,
.dashboard-header p,
.panel-card p,
.muted {
    color: rgba(246, 247, 251, 0.78);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffd58a;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-card,
.panel-card {
    background: rgba(7, 17, 31, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.auth-card {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(8, 18, 32, 0.96), rgba(7, 17, 31, 0.9)),
        rgba(7, 17, 31, 0.82);
}

.auth-side {
    display: grid;
    gap: 24px;
}

.auth-intro-wide {
    max-width: 760px;
}

.auth-intro-wide p {
    max-width: 620px;
    font-size: 1.02rem;
    line-height: 1.7;
}

.auth-banner {
    margin-bottom: -4px;
}

.auth-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.auth-form-card {
    padding: 28px;
    min-height: 100%;
}

.auth-create-card {
    max-width: none;
}

.auth-login-card {
    max-width: none;
}

.auth-card-heading {
    margin-bottom: 20px;
}

.auth-card-heading h2 {
    margin: 6px 0 10px;
    font-size: clamp(1.7rem, 2.2vw, 2.2rem);
}

.auth-card-heading p {
    margin: 0;
    color: rgba(246, 247, 251, 0.72);
    line-height: 1.7;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffd58a;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.primary-button,
.ghost-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    border-radius: 16px;
    font-size: 1rem;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
}

input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 14px 16px;
    outline: none;
}

input:focus {
    border-color: rgba(251, 191, 36, 0.85);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 18px;
}

.primary-button {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #fb7185 100%);
    color: #07111f;
    font-weight: 800;
}

.primary-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.ghost-button {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    min-width: 120px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
    align-items: start;
    position: relative;
    z-index: 30;
}

.panel-card {
    position: relative;
    padding: 24px;
    overflow: visible;
}

.dashboard-grid .panel-card:first-child {
    z-index: 60;
}

.output-card {
    position: relative;
    z-index: 10;
}

.generate-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    position: relative;
    z-index: 8;
}

.select-field {
    display: grid;
    gap: 10px;
}

.select-field span {
    font-size: 0.95rem;
    font-weight: 600;
}

.custom-select {
    position: relative;
    z-index: 25;
}

.custom-select-trigger {
    width: 100%;
    min-height: 58px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 213, 138, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        rgba(15, 27, 44, 0.95);
    color: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.custom-select-value {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trigger-placeholder,
.selected-value {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.custom-select-trigger:focus {
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

.custom-select-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid #ffd58a;
    border-bottom: 2px solid #ffd58a;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.18s ease;
    flex: 0 0 auto;
}

.custom-select.is-open .custom-select-arrow {
    transform: translateY(2px) rotate(-135deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 213, 138, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(9, 18, 31, 0.99);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    z-index: 120;
    transform-origin: top center;
    animation: selectMenuIn 0.16s ease-out;
}

.custom-select-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: #f8fbff;
    text-align: left;
    padding: 14px;
    border-radius: 16px;
    display: block;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
    border: 1px solid transparent;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 213, 138, 0.12);
    transform: translateY(-1px);
}

.custom-select-option:focus {
    outline: none;
    background: rgba(251, 191, 36, 0.12);
}

.option-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.custom-select-menu::-webkit-scrollbar {
    width: 10px;
}

.custom-select-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.9), rgba(251, 113, 133, 0.9));
    border-radius: 999px;
    border: 2px solid rgba(9, 18, 31, 0.95);
}

.custom-select-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.9) rgba(255, 255, 255, 0.04);
}

.playlist-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.flag-badge {
    width: 22px;
    height: 15px;
    border-radius: 4px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, #64748b, #334155);
}

.flag-fr {
    background: linear-gradient(90deg, #1d4ed8 0 33.33%, #ffffff 33.33% 66.66%, #dc2626 66.66% 100%);
}

.flag-us {
    background:
        linear-gradient(180deg, #1d4ed8 0 55%, transparent 55%),
        repeating-linear-gradient(180deg, #dc2626 0 10%, #ffffff 10% 20%);
}

.flag-ca {
    background: linear-gradient(90deg, #dc2626 0 25%, #ffffff 25% 75%, #dc2626 75% 100%);
}

.flag-arab {
    background:
        radial-gradient(circle at 40% 50%, #22c55e 0 28%, transparent 29%),
        linear-gradient(180deg, #0f766e, #0ea5e9);
}

.flag-al {
    background: linear-gradient(180deg, #dc2626, #991b1b);
}

.flag-uk {
    background:
        linear-gradient(90deg, transparent 42%, #ffffff 42% 58%, transparent 58%),
        linear-gradient(180deg, transparent 42%, #ffffff 42% 58%, transparent 58%),
        linear-gradient(90deg, transparent 46%, #dc2626 46% 54%, transparent 54%),
        linear-gradient(180deg, transparent 46%, #dc2626 46% 54%, transparent 54%),
        #1d4ed8;
}

.flag-de {
    background: linear-gradient(180deg, #111827 0 33.33%, #dc2626 33.33% 66.66%, #f59e0b 66.66% 100%);
}

.flag-in {
    background: linear-gradient(180deg, #f59e0b 0 33.33%, #ffffff 33.33% 66.66%, #16a34a 66.66% 100%);
}

.flag-pt {
    background: linear-gradient(90deg, #166534 0 40%, #dc2626 40% 100%);
}

.flag-es {
    background: linear-gradient(180deg, #dc2626 0 25%, #facc15 25% 75%, #dc2626 75% 100%);
}

.flag-it {
    background: linear-gradient(90deg, #16a34a 0 33.33%, #ffffff 33.33% 66.66%, #dc2626 66.66% 100%);
}

.flag-exyu {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.flag-nordic {
    background:
        linear-gradient(90deg, transparent 40%, #f8fafc 40% 54%, transparent 54%),
        linear-gradient(180deg, transparent 42%, #f8fafc 42% 58%, transparent 58%),
        linear-gradient(180deg, #0ea5e9, #1d4ed8);
}

.flag-generic {
    background: linear-gradient(135deg, #475569, #1e293b);
}

@keyframes selectMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.countdown-box {
    display: grid;
    gap: 6px;
    padding: 18px;
    margin: 18px 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.countdown-box span {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #ffd58a;
}

.info-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.info-list div {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-list dt {
    color: #ffd58a;
    margin-bottom: 6px;
}

.info-list dd {
    margin: 0;
}

.output-card {
    display: grid;
    gap: 18px;
}

.output-block {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.output-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.output-title {
    color: #ffd58a;
    font-weight: 700;
}

.output-value {
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.output-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.output-inline-text {
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.output-value.is-selectable,
.output-inline-text,
.output-line span {
    user-select: text;
    -webkit-user-select: text;
}

.output-lines {
    display: grid;
    gap: 10px;
}

.output-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.output-line span {
    flex: 1 1 auto;
}

.copy-button {
    appearance: none;
    border: 1px solid rgba(255, 213, 138, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #ffe4b5;
    border-radius: 10px;
    padding: 6px 10px;
    min-height: 32px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    flex: 0 0 auto;
    line-height: 1;
}

.copy-button:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.34);
    transform: translateY(-1px);
}

.copy-button.is-copied {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.34);
    color: #dcfce7;
}

.copy-button.is-copy-error {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fecaca;
}

.copy-button-inline {
    min-width: 66px;
    align-self: center;
}

.small-text {
    font-size: 0.92rem;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.16);
    color: #b8f8c9;
}

.alert-error {
    background: rgba(248, 113, 113, 0.16);
    color: #ffd1d1;
}

@media (max-width: 900px) {
    .auth-shell,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        padding-top: 32px;
    }

    .auth-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .auth-login-card,
    .auth-create-card {
        max-width: none;
        margin-left: 0;
    }

    .output-head,
    .output-inline-row,
    .output-line {
        flex-direction: column;
        align-items: stretch;
    }

}
.waiting-card,
.error-card {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.waiting-card {
    display: grid;
    gap: 14px;
}

.waiting-head,
.error-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.waiting-spinner {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #f59e0b;
    animation: spin 0.8s linear infinite;
    flex: 0 0 auto;
}

.waiting-title,
.error-title {
    font-weight: 800;
    color: #ffffff;
}

.waiting-meta,
.error-copy {
    color: rgba(246, 247, 251, 0.82);
    line-height: 1.7;
}

.error-card {
    display: grid;
    gap: 16px;
    border-color: rgba(34, 197, 94, 0.18);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.04));
}

.error-badge {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14);
    flex: 0 0 auto;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 16px 32px rgba(34, 197, 94, 0.22);
}

.inline-status {
    margin-top: 12px;
    font-size: 0.95rem;
    color: rgba(246, 247, 251, 0.82);
}

.primary-button.is-loading {
    pointer-events: none;
    opacity: 0.9;
}

.primary-button.is-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border-radius: 999px;
    border: 3px solid rgba(7, 17, 31, 0.22);
    border-top-color: #07111f;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.wait-popup {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 18px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.wait-popup-inline {
    margin-top: 0;
}

.wait-popup-spinner {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top-color: #f59e0b;
    animation: spin 0.85s linear infinite;
}

.wait-popup-text {
    color: rgba(246, 247, 251, 0.9);
    font-size: 0.95rem;
    line-height: 1.7;
}
.ready-popup {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 20px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(34, 197, 94, 0.28);
    box-shadow: 0 18px 36px rgba(34, 197, 94, 0.16);
    text-align: center;
}

.ready-popup-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.28);
}

.ready-popup-title {
    color: #dcfce7;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.ready-popup-text {
    color: rgba(246, 247, 251, 0.92);
    font-size: 0.96rem;
    line-height: 1.7;
}
