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

body.portal-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Network Canvas */
#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.portal-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

.portal-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-5px);
}

.portal-logo {
    text-align: center;
    margin-bottom: 40px;
}

.wifi-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

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

.portal-logo h1 {
    background: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.portal-logo p {
    color: #94A3B8;
    font-size: 14px;
}

.form-description {
    color: #CBD5E1;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 15px;
    color: #1E293B;
    transition: all 0.3s ease;
    font-family: monospace;
    font-size: 16px;
    text-transform: uppercase;
}

.input-group input:focus {
    outline: none;
    border-color: #0EA5E9;
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.input-group input::placeholder {
    color: #94A3B8;
    text-transform: none;
}

.btn-connect {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.4);
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.alert.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
    border-left: 4px solid #10B981;
}

.alert.error {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
    border-left: 4px solid #EF4444;
}

.portal-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-footer p {
    color: #64748B;
    font-size: 12px;
}

/* Success State Styles */
.success-state {
    text-align: center;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

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

.success-state h2 {
    color: #6EE7B7;
    font-size: 24px;
    margin-bottom: 10px;
}

.success-state p {
    color: #CBD5E1;
    margin-bottom: 30px;
}

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

.info-card {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:last-child {
    border-bottom: none;
}

.info-label {
    color: #94A3B8;
    font-weight: 500;
}

.info-value {
    color: #7DD3FC;
    font-weight: 700;
    font-family: monospace;
    font-size: 18px;
}

.info-note {
    color: #64748B;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .portal-card {
        padding: 32px 24px;
    }
    
    .portal-logo h1 {
        font-size: 28px;
    }
    
    .wifi-icon {
        font-size: 48px;
    }
}