* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e27;
    background-image: 
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(0, 150, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 200, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 0, 255, 0.05) 0%, transparent 50%);
    background-size: 
        50px 50px,
        50px 50px,
        800px 800px,
        600px 600px,
        1000px 1000px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Horizontal pathways */
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 255, 0.1) 20%, rgba(0, 255, 255, 0.1) 30%, transparent 50%),
        linear-gradient(90deg, transparent 50%, rgba(0, 150, 255, 0.08) 60%, rgba(0, 150, 255, 0.08) 70%, transparent 100%),
        /* Vertical pathways */
        linear-gradient(0deg, transparent 0%, rgba(0, 255, 200, 0.1) 25%, rgba(0, 255, 200, 0.1) 35%, transparent 60%),
        linear-gradient(0deg, transparent 40%, rgba(100, 0, 255, 0.08) 50%, rgba(100, 0, 255, 0.08) 60%, transparent 80%),
        /* Diagonal pathways */
        linear-gradient(45deg, transparent 0%, rgba(0, 255, 255, 0.05) 30%, transparent 60%),
        linear-gradient(-45deg, transparent 0%, rgba(0, 150, 255, 0.05) 40%, transparent 70%);
    background-size: 
        200% 4px,
        150% 3px,
        4px 200%,
        3px 180%,
        300% 2px,
        250% 2px;
    background-position: 
        0% 20%,
        100% 60%,
        30% 0%,
        70% 100%,
        0% 0%,
        100% 100%;
    animation: pathwayMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Circuit nodes */
        radial-gradient(circle at 15% 25%, rgba(0, 255, 255, 0.15) 0%, rgba(0, 255, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 85% 75%, rgba(0, 150, 255, 0.12) 0%, rgba(0, 150, 255, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 50% 10%, rgba(0, 255, 200, 0.1) 0%, rgba(0, 255, 200, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 20% 80%, rgba(100, 0, 255, 0.1) 0%, rgba(100, 0, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 90% 30%, rgba(0, 255, 255, 0.08) 0%, rgba(0, 255, 255, 0.08) 1.5px, transparent 1.5px),
        radial-gradient(circle at 10% 70%, rgba(0, 150, 255, 0.08) 0%, rgba(0, 150, 255, 0.08) 1.5px, transparent 1.5px);
    background-size: 
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%;
    pointer-events: none;
    z-index: 0;
    animation: nodePulse 4s ease-in-out infinite;
}

@keyframes pathwayMove {
    0% {
        background-position: 
            0% 20%,
            100% 60%,
            30% 0%,
            70% 100%,
            0% 0%,
            100% 100%;
    }
    100% {
        background-position: 
            100% 20%,
            0% 60%,
            30% 100%,
            70% 0%,
            100% 100%,
            0% 0%;
    }
}

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.portal-wrapper {
    width: 100%;
}

.portal-card {
    background: #000000;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 255, 0.1);
    border: 1px solid #333;
    position: relative;
    z-index: 1;
}

.portal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.portal-logo img {
    max-width: 300px;
    max-height: 150px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

h1 {
    font-size: 28px;
    color: #d3d3d3;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 300;
}

.subtitle {
    color: #999;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.btn-google:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-link {
    background: transparent;
    color: #999;
    text-decoration: underline;
    font-size: 14px;
}

.btn-link:hover {
    color: #d3d3d3;
}

.btn-primary {
    background: #333;
    color: #d3d3d3;
    border: 1px solid #555;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    position: relative;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(211, 211, 211, 0.3);
    border-top-color: #d3d3d3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #333;
}

.divider span {
    padding: 0 15px;
}

.email-login {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d3d3d3;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 16px;
    background: #1a1a1a;
    color: #d3d3d3;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #555;
    background: #222;
}

.form-group input::placeholder {
    color: #666;
}

.error-message {
    background: #2a1a1a;
    color: #ff6b6b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #4a2a2a;
}

.error-text {
    color: #c33;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-text.show {
    display: block;
}

.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    font-weight: bold;
}

.success-card h1 {
    color: #4caf50;
    margin-bottom: 10px;
}

.info {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* Login page specific styles */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.email-display {
    background: #f5f6fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #666;
}

.email-display strong {
    color: #333;
}

.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #d3d3d3;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.terms-link {
    color: #999;
    text-decoration: underline;
    cursor: pointer;
}

.terms-link:hover {
    color: #d3d3d3;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #000000;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 255, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    color: #d3d3d3;
    font-size: 24px;
    font-weight: 300;
}

.modal-close {
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #d3d3d3;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    color: #d3d3d3;
    line-height: 1.6;
}

.modal-body h3 {
    color: #d3d3d3;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    margin-top: 0;
}

@media (max-width: 480px) {
    .portal-card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
}

