/**
 * CAPTIVE PORTAL - CARNAVAL DE RECIFE
 * Estilos do Portal Wi-Fi
 */

/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores do Carnaval de Recife */
    --carnival-yellow: #FFD700;
    --carnival-orange: #FF6B35;
    --carnival-red: #E63946;
    --carnival-pink: #FF69B4;
    --carnival-purple: #9B59B6;
    --carnival-blue: #3498DB;
    --carnival-green: #2ECC71;
    --carnival-teal: #1ABC9C;

    /* Cores principais */
    --primary: #E63946;
    --primary-dark: #C62828;
    --secondary: #FFD700;
    --accent: #3498DB;

    /* Neutros */
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --bg-light: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;

    /* Gradientes */
    --gradient-carnival: linear-gradient(135deg, #E63946 0%, #FFD700 50%, #2ECC71 100%);
    --gradient-sunset: linear-gradient(135deg, #E63946 0%, #FF6B35 50%, #FFD700 100%);
    --gradient-primary: linear-gradient(135deg, #E63946 0%, #C62828 100%);

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --shadow-carnival: 0 8px 32px rgba(230, 57, 70, 0.3);

    /* Bordas */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== BACKGROUND ANIMADO ===== */
.carnival-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

/* Confetes */
.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--carnival-yellow);
    opacity: 0.7;
    animation: confetti-fall 8s linear infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: var(--carnival-red);
}

.confetti:nth-child(2) {
    left: 30%;
    animation-delay: 1.5s;
    background: var(--carnival-yellow);
    width: 12px;
    height: 12px;
}

.confetti:nth-child(3) {
    left: 50%;
    animation-delay: 3s;
    background: var(--carnival-green);
}

.confetti:nth-child(4) {
    left: 70%;
    animation-delay: 4.5s;
    background: var(--carnival-blue);
    width: 10px;
    height: 10px;
}

.confetti:nth-child(5) {
    left: 90%;
    animation-delay: 6s;
    background: var(--carnival-purple);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Serpentinas */
.streamer {
    position: absolute;
    width: 3px;
    height: 150px;
    opacity: 0.5;
    animation: streamer-wave 6s ease-in-out infinite;
}

.streamer-1 {
    left: 5%;
    top: 20%;
    background: linear-gradient(to bottom, var(--carnival-yellow), transparent);
    animation-delay: 0s;
}

.streamer-2 {
    right: 10%;
    top: 30%;
    background: linear-gradient(to bottom, var(--carnival-red), transparent);
    animation-delay: 2s;
}

.streamer-3 {
    left: 15%;
    bottom: 20%;
    background: linear-gradient(to bottom, var(--carnival-green), transparent);
    animation-delay: 4s;
}

@keyframes streamer-wave {
    0%, 100% {
        transform: rotate(-15deg) translateX(0);
    }
    50% {
        transform: rotate(15deg) translateX(20px);
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.frevo-umbrella {
    width: 80px;
    height: 80px;
    background: var(--gradient-sunset);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: var(--shadow-carnival);
    animation: umbrella-bounce 3s ease-in-out infinite;
}

@keyframes umbrella-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-carnival);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1rem;
    color: var(--carnival-yellow);
    font-weight: 500;
}

.decorative-line {
    width: 150px;
    height: 4px;
    background: var(--gradient-carnival);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    padding: 8px;
    border-radius: var(--radius-lg);
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-light);
    background: rgba(255,255,255,0.1);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 1rem;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM CONTAINER ===== */
.form-container {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.maracatu-icon,
.boneco-icon,
.frevo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--gradient-sunset);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== FORM ===== */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-light);
}

.input-group label i {
    color: var(--carnival-yellow);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--carnival-yellow);
    background: rgba(255,255,255,0.12);
}

.toggle-password {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--carnival-yellow);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-carnival);
}

.btn-carnival {
    background: var(--gradient-sunset);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-carnival::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn-carnival:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-outline {
    background: transparent;
    color: var(--carnival-red);
    border: 2px solid var(--carnival-red);
}

.btn-outline:hover {
    background: var(--carnival-red);
    color: white;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--carnival-yellow);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ===== PLANS ===== */
.plans-container {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.plans-header {
    text-align: center;
    margin-bottom: 30px;
}

.plans-grid {
    display: grid;
    gap: 15px;
}

.plan-card {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    border-color: var(--carnival-yellow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.plan-card.popular {
    border-color: var(--carnival-yellow);
}

.plan-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--gradient-sunset);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 40px;
    transform: rotate(45deg);
}

.plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.plan-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-price {
    text-align: right;
}

.plan-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--carnival-yellow);
}

.plan-price .duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--carnival-red);
}

/* ===== PAYMENT MODAL ===== */
.payment-header {
    text-align: center;
    margin-bottom: 25px;
}

.pix-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #32BCAD, #00D4AA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.payment-header h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.payment-header p {
    color: var(--text-muted);
}

.qr-container {
    text-align: center;
    margin-bottom: 20px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 10px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code img {
    max-width: 100%;
    max-height: 100%;
}

.qr-instruction {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.divider span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pix-copy label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.copy-container {
    display: flex;
    gap: 10px;
}

.copy-container input {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.85rem;
}

.payment-info {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--carnival-yellow);
}

.payment-status {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
}

.status-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.status-icon.pending {
    background: rgba(255,193,7,0.2);
    color: #FFC107;
    animation: pulse 2s infinite;
}

.status-icon.success {
    background: rgba(46,204,113,0.2);
    color: #2ECC71;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ===== SUCCESS MODAL ===== */
.success-modal {
    text-align: center;
}

.success-animation {
    position: relative;
    margin-bottom: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(46,204,113,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #2ECC71;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-message {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.session-info {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===== SESSION PANEL ===== */
.session-panel {
    margin-top: 20px;
}

.session-panel.hidden {
    display: none;
}

.session-card {
    background: rgba(46,204,113,0.1);
    border: 2px solid var(--carnival-green);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.session-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.wifi-icon {
    width: 50px;
    height: 50px;
    background: var(--carnival-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.wifi-icon.active {
    animation: wifiPulse 2s infinite;
}

@keyframes wifiPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46,204,113,0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(46,204,113,0);
    }
}

.session-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.detail-item i {
    color: var(--carnival-yellow);
    width: 20px;
}

.detail-item.time-remaining {
    background: rgba(46,204,113,0.2);
}

.detail-item.time-remaining span {
    font-weight: 600;
    color: var(--carnival-green);
}

.session-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-carnival);
    border-radius: 4px;
    transition: width 1s ease;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--carnival-yellow);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

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

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
}

.toast.success {
    border-color: var(--carnival-green);
}

.toast.success i {
    color: var(--carnival-green);
}

.toast.error {
    border-color: var(--carnival-red);
}

.toast.error i {
    color: var(--carnival-red);
}

.toast.warning {
    border-color: var(--carnival-yellow);
}

.toast.warning i {
    color: var(--carnival-yellow);
}

.toast.info {
    border-color: var(--carnival-blue);
}

.toast.info i {
    color: var(--carnival-blue);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== FOOTER ===== */
.footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-content p i {
    color: var(--carnival-yellow);
    margin: 0 5px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: var(--carnival-yellow);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .frevo-umbrella {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 30%;
        padding: 10px;
        font-size: 0.8rem;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn i {
        font-size: 1.2rem;
    }

    .form-container,
    .plans-container {
        padding: 20px;
    }

    .modal-content {
        padding: 20px;
    }

    .payment-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
