html, body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: 'Inter', sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.14), transparent 32%),
        linear-gradient(180deg, #111827 0%, #0f172a 48%, #0b1120 100%);
    color: #ffffff;
}

.hotspot-placement-mode-cursor .pnlm-render-container { cursor: crosshair !important; }
.view { display: none; }
.view.active { display: flex; }

.auth-view {
    flex: 1;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.auth-panel {
    width: 100%;
    max-width: 980px;
}

.auth-card {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(10px);
    padding: 38px 40px 32px;
}

.auth-card--two-column {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 26px;
}

.auth-col--plans {
    border-left: 1px solid rgba(148, 163, 184, 0.18);
    padding-left: 22px;
}

.auth-cancelled-banner {
    grid-column: 1 / -1;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

.plan-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1.4rem;
    font-weight: 800;
}

.plan-subtitle {
    margin: 8px 0 14px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.plan-grid {
    display: grid;
    gap: 12px;
}

.plan-card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    padding: 14px;
    text-align: left;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.75);
}

.plan-card--active {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.plan-chip {
    font-size: 0.76rem;
    font-weight: 800;
    color: #bfdbfe;
    letter-spacing: 0.03em;
}

.plan-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

.plan-note {
    font-size: 0.88rem;
    color: #cbd5e1;
}

.plan-features {
    font-size: 0.82rem;
    color: #94a3b8;
}

.plan-cta {
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 0.86rem;
}

.auth-footer-wrap {
    grid-column: 1 / -1;
}

.auth-view[data-auth-mode="login"] .auth-col--plans {
    display: none;
}

.auth-view[data-auth-mode="login"] .auth-card--two-column {
    grid-template-columns: 1fr;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #93c5fd;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    font-weight: 800;
}

.auth-subtitle {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.6;
}

.auth-field {
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 10px;
    background: #374151;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.4;
    padding: 16px 18px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.28);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
    background: #3b4558;
}

.auth-password-wrap {
    position: relative;
}

.auth-input--password {
    padding-right: 52px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
}

.auth-password-toggle:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.35);
    outline-offset: 2px;
}

.auth-password-toggle[aria-pressed='true'] {
    color: #e2e8f0;
}

.auth-password-toggle-icon {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.auth-error {
    min-height: 24px;
    margin: 8px 0 18px;
    text-align: center;
    color: #ff5a5f;
    font-size: 0.98rem;
    font-weight: 600;
}

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

.auth-button {
    flex: 1;
    border: 0;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
}

.auth-button:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.42);
    outline-offset: 2px;
}

.auth-button:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.auth-button--primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.auth-button--primary:hover {
    background: linear-gradient(180deg, #4b8df6 0%, #1d4ed8 100%);
}

.auth-button--secondary {
    background: #3b475d;
    color: #ffffff;
}

.auth-button--secondary:hover {
    background: #46536a;
}

.auth-footer {
    margin: 18px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.98rem;
}

.auth-view[data-auth-mode="register"] .auth-badge {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.24);
    color: #6ee7b7;
}

@media (max-width: 640px) {
    .auth-view {
        padding: 18px;
    }

    .auth-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }

    .auth-card--two-column {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .auth-col--plans {
        border-left: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
        padding-left: 0;
        padding-top: 14px;
    }

    .auth-actions {
        flex-direction: column;
    }

    .auth-button {
        width: 100%;
    }
}

.scene-selector-thumbnail {
    width: 60px;
    height: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.text-hotspot {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease-in-out;
    white-space: nowrap;
}

.text-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

