* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    --bg-color: #0b0c10;
    --bg-deep: #05070b;
    --card-bg: #14161f;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-neon: #00ffcc;
    --accent-purple: #7000ff;
    --danger: #ff4757;
    --warning: #ffb703;
    --border-subtle: #1f222f;
    --border-hover: #31354b;
    --gradient-primary: linear-gradient(135deg, #00ffcc 0%, #7000ff 100%);
}

html,
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(112, 0, 255, 0.14) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

.pin-page-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* Cabeçalho idêntico ao padrão do site (3pistas.html, sobre.html, plano.html) */
.site-header {
    height: 80px;
    width: 100%;
    border-bottom: 1px solid #1e293b;
    background-color: rgba(5, 7, 11, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 16px;
}

.brand-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    transition: transform 0.2s ease;
}

.brand-box:hover {
    transform: translateY(-1px);
}

.logo-rs {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -2px;
    display: flex;
    gap: 0px;
}

.logo-rs span {
    background: linear-gradient(135deg, #00ffcc 0%, #7000ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.logo-rs span.mirrored {
    transform: scaleX(-1);
}

.logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(0, 255, 204, 0.08);
    color: #00ffcc;
    border: 1px solid rgba(0, 255, 204, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-voltar:hover {
    background: #00ffcc;
    color: #05070b;
    box-shadow: 0 0 18px rgba(0, 255, 204, 0.4);
    transform: translateY(-1px);
}

.lang-selector-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-lang-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
}

.btn-lang-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-neon);
    color: #ffffff;
}

.btn-lang-trigger i.ph-globe {
    font-size: 1.15rem;
    color: var(--accent-neon);
}

.btn-lang-trigger i.ph-caret-down {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-idiomas-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 185px;
    flex-direction: column;
    gap: 2px;
    background: #14161f;
    border: 1px solid #31354b;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.65);
    z-index: 1050;
}

.lang-menu-option {
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-menu-option:hover,
.lang-menu-option.active {
    background: rgba(0, 255, 204, 0.1);
    color: var(--accent-neon);
}

.pin-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 64px;
    background: transparent;
}

.pin-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 32px;
    background: rgba(20, 22, 31, 0.94);
    border: 1px solid var(--border-subtle);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(112, 0, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-align: center;
}

.pin-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.pin-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 28px;
}

.pin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pin-input {
    width: 100%;
    height: 68px;
    background: #080a0f;
    border: 2px solid #262b3d;
    border-radius: 14px;
    text-align: center;
    font-size: clamp(1.85rem, 5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0.42em;
    padding-left: 0.42em;
    color: var(--accent-neon);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-variant-numeric: tabular-nums;
}

.pin-input::placeholder {
    color: rgba(156, 163, 175, 0.28);
}

.pin-input:focus {
    background: var(--bg-deep);
    border-color: var(--accent-neon);
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.12), 0 0 24px rgba(0, 255, 204, 0.18);
}

.pin-input.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.14);
    animation: pinShake 0.34s ease;
}

@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

.btn-submit-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: var(--bg-deep);
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-submit-pin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 255, 204, 0.28);
}

.btn-submit-pin:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit-pin:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pin-feedback {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    align-items: flex-start;
    gap: 10px;
}

.pin-feedback.visivel {
    display: flex;
}

.pin-feedback i {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pin-feedback.error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.35);
    color: #ff8590;
}

.pin-feedback.warning {
    background: rgba(255, 183, 3, 0.1);
    border: 1px solid rgba(255, 183, 3, 0.35);
    color: #ffd166;
}

.pin-feedback.success {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.35);
    color: #6fffe4;
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 16px;
    }

    .header-actions {
        gap: 10px;
    }

    .btn-voltar {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .btn-lang-trigger {
        padding: 7px 10px;
        font-size: 0.82rem;
    }

    .pin-card {
        padding: 32px 22px;
        border-radius: 18px;
    }

    .pin-title {
        font-size: 1.5rem;
    }

    .pin-input {
        height: 62px;
        letter-spacing: 0.32em;
        padding-left: 0.32em;
    }
}
