/* ============================================
   WiFi Portal - Clean & Modern
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: flex-end;
    gap: 30px;
    padding: 60px; 
    position: relative;
}

/* Background chỉ cho trang WiFi portal */
body.wifi-page {
    background: url('../caphe.jpg') center center no-repeat fixed;
    background-size: cover;
}

body.wifi-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 0;
}

/* Promo Cards - Left Side */
.promo-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 200px;
    z-index: 10;
}

.promo-card {
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.95), rgba(101, 67, 33, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: fadeInRight 0.6s ease-out;
    transition: all 0.3s;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.promo-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.promo-card:nth-child(1) { animation-delay: 0.1s; }
.promo-card:nth-child(2) { animation-delay: 0.2s; }
.promo-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.promo-card .icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.promo-card .title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.promo-card .desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 10px;
}

.promo-card .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Vòng sóng nền - Removed */
.promo {
    position: absolute;
    color: white;
    background: rgba(102, 126, 234, 0.95);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px; 
    padding: 14px 16px;
    width: 140px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    animation: floatY 5s ease-in-out infinite;
}

.promo-1 { top: 20px; left: -160px; animation-delay: 0s; }
.promo-2 { bottom: 20px; left: -160px; animation-delay: 1.2s; }
.promo-3 { top: 20px; right: -160px; animation-delay: 0.6s; }
.promo-4 { bottom: 20px; right: -160px; animation-delay: 1.8s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.promo .icon { 
    font-size: 24px; 
    margin-bottom: 6px; 
}
.promo .title { 
    font-size: 12px; 
    font-weight: 700; 
    margin-bottom: 4px; 
}
.promo .desc { 
    font-size: 10px; 
    opacity: 0.95; 
    line-height: 1.3; 
}
.promo .badge {
    display: inline-block; 
    margin-top: 6px;
    background: rgba(255,255,255,0.3);
    color: white;
    font-size: 9px; 
    font-weight: 700;
    padding: 3px 8px; 
    border-radius: 20px;
}

/* Form card */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 36px 32px; 
    width: 100%; 
    max-width: 420px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
    position: relative; 
    z-index: 10;
    animation: slideInRight 0.6s cubic-bezier(0.175,0.885,0.32,1.275);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.header { 
    text-align: center; 
    margin-bottom: 20px; 
}

.wifi-ball {
    width: 70px; 
    height: 70px; 
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2, #50C878);
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin: 0 auto 12px;
    animation: glow 2.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,144,226,0.5); }
    50% { box-shadow: 0 0 0 15px rgba(74,144,226,0); }
}

.wifi-ball svg { 
    width: 36px; 
    height: 36px; 
    fill: white; 
}

.header h1 { 
    font-size: 22px; 
    color: #1a1a2e; 
    font-weight: 800;
    margin-bottom: 4px;
}

.header p { 
    font-size: 13px; 
    color: #7F8C8D; 
    margin-top: 4px; 
}

/* Tabs */
.tabs { 
    display: flex; 
    border: 2px solid #4A90E2; 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 18px; 
}

.tab { 
    flex: 1; 
    padding: 11px; 
    border: none; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 700; 
    transition: all 0.3s; 
}

.tab.on { 
    background: #4A90E2; 
    color: white; 
}

.tab:not(.on) { 
    background: white; 
    color: #4A90E2; 
}

/* Fields */
.fg { 
    margin-bottom: 14px; 
}

.fg.form-spacer {
    height: 60px;
    margin-bottom: 14px;
}

.fg label { 
    display: block; 
    margin-bottom: 5px; 
    font-size: 13px; 
    font-weight: 600; 
    color: #2C3E50; 
}

.fg input {
    width: 100%; 
    padding: 11px 13px;
    border: 2px solid #E8ECF0; 
    border-radius: 10px;
    font-size: 14px; 
    outline: none; 
    background: #f8f9fa; 
    transition: all 0.3s;
}

.fg input:focus { 
    border-color: #4A90E2; 
    background: white; 
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1); 
}

.ck { 
    display: flex; 
    align-items: flex-start; 
    gap: 10px; 
    cursor: pointer; 
}

.ck input { 
    width: 18px; 
    height: 18px; 
    margin-top: 2px; 
    accent-color: #4A90E2; 
    flex-shrink: 0; 
}

.ck span { 
    font-size: 12px; 
    color: #5a6c7d; 
    line-height: 1.5; 
}

.ck a { 
    color: #4A90E2; 
    text-decoration: none; 
    font-weight: 600; 
}

.btn {
    width: 100%; 
    padding: 13px; 
    margin-top: 14px;
    background: linear-gradient(135deg, #4A90E2, #50C878);
    color: white; 
    border: none; 
    border-radius: 12px;
    font-size: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s;
}

.btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(74,144,226,0.4); 
}

.btn:disabled { 
    background: #BDC3C7; 
    cursor: not-allowed; 
    transform: none; 
    box-shadow: none; 
}

.btn .sp {
    display: none; 
    width: 20px; 
    height: 20px; 
    margin: 0 auto;
    border: 3px solid rgba(255,255,255,0.3); 
    border-top-color: white;
    border-radius: 50%; 
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

.btn.loading .sp { display: block; }
.btn.loading .bt { display: none; }

.alert { 
    padding: 10px 13px; 
    border-radius: 10px; 
    margin-bottom: 14px; 
    font-size: 13px; 
    display: none; 
}

.alert.show { display: block; }

.alert.ok { 
    background: #D4EDDA; 
    color: #155724; 
    border: 1px solid #C3E6CB; 
}

.alert.err { 
    background: #F8D7DA; 
    color: #721C24; 
    border: 1px solid #F5C6CB; 
}

.foot { 
    text-align: center; 
    margin-top: 14px; 
    font-size: 11px; 
    color: #95A5A6; 
}

@media (max-width: 1100px) {
    body { 
        flex-direction: column;
        gap: 20px;
        padding: 40px 20px;
        justify-content: flex-start;
        min-height: 100vh;
        height: auto;
    }
    
    .promo-container {
        max-width: 100%;
        width: 100%;
        flex-direction: row;
        gap: 12px;
        order: 2;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .promo-container::-webkit-scrollbar {
        height: 6px;
    }
    
    .promo-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    
    .promo-container::-webkit-scrollbar-thumb {
        background: rgba(139, 90, 43, 0.5);
        border-radius: 10px;
    }
    
    .promo-card {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .card {
        order: 1;
        max-width: 440px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body { 
        padding: 30px 20px; 
    }
}

@media (max-width: 500px) { 
    body {
        padding: 20px 16px;
    }
    
    .card { 
        padding: 30px 24px;
        max-width: 100%;
    }
    
    .promo-card {
        flex: 0 0 240px;
        min-width: 240px;
        padding: 16px;
    }
    
    .promo-card .icon {
        font-size: 28px;
    }
    
    .promo-card .title {
        font-size: 14px;
    }
    
    .promo-card .desc {
        font-size: 11px;
    }
}

/* Success Page Styles */
.success-page {
    text-align: center;
    max-width: 500px;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #50C878, #3CB371);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(80, 200, 120, 0.4);
}

@keyframes successPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.success-icon svg {
    width: 38px;
    height: 38px;
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: #50C878;
    margin-bottom: 8px;
}

.success-desc {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.5;
    margin-bottom: 18px;
}

.connection-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
    border: 2px solid #E8ECF0;
}

.connection-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    text-align: center;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #E8ECF0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #7F8C8D;
    font-weight: 600;
}

.info-value {
    font-size: 13px;
    color: #1a1a2e;
    font-weight: 700;
    text-align: right;
}

.notice-box {
    background: #FFF3CD;
    border: 2px solid #FFE69C;
    border-radius: 10px;
    padding: 12px;
    margin: 14px 0;
}

.notice-box p {
    margin: 0;
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
    text-align: left;
}
