:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #818cf8;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --error: #fb7185;
    --success: #34d399;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(79, 172, 254, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 0 15px;
    z-index: 10;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: min(32px, 6vh);
    padding: clamp(16px, 3vh, 32px) clamp(16px, 4vw, 32px);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header & Logo */
header .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

header .logo .main-logo {
    width: auto;
    height: clamp(40px, 12vh, 120px);
    max-width: 100%;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.3));
    animation: fadeInLogo 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    object-fit: contain;
}

@keyframes fadeInLogo {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

header h1 {
    font-size: clamp(18px, 3vh, 24px);
    font-weight: 800;
    margin-bottom: 4px;
    color: white;
    letter-spacing: -0.5px;
}

header p {
    font-size: clamp(12px, 1.8vh, 14px);
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Custom Checkbox */
.checkbox-group {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox:hover input ~ .checkmark {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.custom-checkbox input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #0f172a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.terms-text a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    text-align: left;
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
    margin-left: 4px;
    letter-spacing: 1px;
}

.input-group input,
.input-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

.input-group select option {
    background: #1e293b;
    color: #f8fafc;
    padding: 12px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.1);
}

/* Plan Cards */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.plan-card {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(79, 172, 254, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card:hover {
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 242, 254, 0.15);
}

.plan-card:active {
    transform: translateY(0);
}

.plan-card.selected {
    border-color: var(--primary);
    background: rgba(0, 242, 254, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15), 0 8px 25px -5px rgba(0, 242, 254, 0.2);
}

.plan-card.selected::before {
    opacity: 1;
}

.plan-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes checkPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.plan-card.loading {
    cursor: default;
    border-style: dashed;
    opacity: 0.5;
}

.plan-card.error {
    cursor: default;
    border-color: rgba(251, 113, 133, 0.3);
    opacity: 0.6;
}

.plan-loading-text {
    font-size: 13px;
    color: var(--text-muted);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.plan-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    position: relative;
    z-index: 1;
}

.plan-price small {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-name {
    font-size: clamp(12px, 2vh, 14px);
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.plan-duration {
    font-size: clamp(10px, 1.6vh, 12px);
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Per hour badge */
.plan-per-hour {
    font-size: 10px;
    color: var(--accent);
    background: rgba(129, 140, 248, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Status Message */
.status-message {
    font-size: 12px;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.status-message.error { color: var(--error); background: rgba(251, 113, 133, 0.1); }
.status-message.success { color: var(--success); background: rgba(52, 211, 153, 0.1); }

/* Submit Button Style */
#submitBtn {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #0f172a;
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px -5px rgba(0, 242, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 15px 40px -8px rgba(0, 242, 254, 0.5);
}

#submitBtn:active:not(:disabled) {
    transform: translateY(-1px);
}

#submitBtn:disabled {
    opacity: 0.5;
    background: #475569;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #0f172a;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

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

/* Footer Section */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-top: 2vh;
    border-top: 1px solid rgba(255, 255, 255, 0.08); /* Aquela linha que o usuário achou estranha está aqui, vamos suavizar */
}

footer p { font-size: 14px; color: var(--text-muted); margin-bottom: 1vh; }

.whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(52, 211, 153, 0.12);
    padding: clamp(10px, 1.5vh, 14px) 24px;
    border-radius: 50px;
    color: #34d399;
    font-weight: 700;
    font-size: clamp(13px, 1.8vh, 15px);
    border: 1px solid rgba(52, 211, 153, 0.1);
    user-select: all;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 400px;
    padding: clamp(20px, 4vh, 32px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    text-align: left;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
    color: #0f172a;
}

/* Responsive — telas pequenas */
@media (max-width: 380px) {
    .plans-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .plan-card {
        padding: 12px 8px;
        border-radius: 12px;
    }

    .plan-price {
        font-size: 20px;
    }

    .plan-name {
        font-size: 11px;
    }

    .plan-duration {
        font-size: 10px;
    }

    .plan-per-hour {
        font-size: 9px;
        padding: 1px 6px;
    }
}

@media (max-width: 320px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Quando tem 1 plano só, ocupa largura total */
.plans-grid.single .plan-card {
    max-width: 200px;
    margin: 0 auto;
}

.glass-card {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.glass-card::-webkit-scrollbar {
    display: none;
}
