/* ===========================
   CSS Premium - Captive Portal
   =========================== */

   :root {
    --bg-base: #0f172a; /* Slate 900 */
    --accent: #00d2ff; 
    --accent-hover: #00a8cc; 
    --accent-glow: rgba(0, 210, 255, 0.5);
    
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --radius-lg: 24px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* --- Animated Background Glows --- */
.background-animation {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: #00d2ff;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6; /* Violet */
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.glow-3 {
    width: 200px;
    height: 200px;
    background: #0ea5e9; /* Sky */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.2) translate(50px, 30px); }
    100% { transform: scale(0.9) translate(-30px, 50px); }
}

/* --- Main Glassmorphism Container --- */
.portal-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Brand Header --- */
.brand {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 0 30px var(--accent-glow);
}

.portal-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand p {
    font-size: 14px;
    color: var(--text-muted);
}

/* --- Tabs --- */
.tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--glass-border);
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Forms --- */
.forms-wrapper {
    position: relative;
}

.form {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.form.active {
    display: block;
}

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

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

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: #475569;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.6);
}

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

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

.submit-btn.alt {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}
.submit-btn.alt:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.helper-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* --- Social Login Options --- */
.social-login {
    margin-top: 24px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.social-login span {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-social {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-social:hover {
    background: var(--glass-border);
    transform: scale(1.05);
}

/* --- Success Screen --- */
.success-screen {
    text-align: center;
    padding: 20px 0;
}

.success-screen.hidden {
    display: none;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.success-screen h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #4ade80;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto 16px;
}

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

.redirect-hint {
    font-size: 13px;
    color: var(--text-muted);
}
