/* GATEWAY STYLES - source.html (Login Page) */
:root {
    --cosmic-deep: #0a0a14;
    --portal-blue: #0b1b2f;
    --cosmic-blue: #0f1b2d;
    --event-horizon: #00e5ff;
    --portal-glow: rgba(0, 229, 255, 0.3);
    --accretion-gold: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satoshi', sans-serif;
    background: var(--cosmic-deep);
    color: rgba(255, 255, 255, 0.92);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Gateway Background */
.gateway-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.dimensional-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridFlow 20s linear infinite;
}

.energy-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle,
            rgba(0, 229, 255, 0.15) 0%,
            transparent 70%);
    animation: energyPulse 4s ease-in-out infinite;
}

/* Gateway Container */
.gateway-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 60px;
    align-items: center;
}

/* Gateway Visual (Left Side) */
.gateway-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.gateway-arch {
    position: relative;
    width: 400px;
    height: 500px;
}

.arch-frame {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 400px;
    border: 3px solid rgba(0, 229, 255, 0.3);
    border-radius: 150px 150px 0 0;
    border-bottom: none;
}

.arch-energy {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 420px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 160px 160px 0 0;
    border-bottom: none;
    animation: archPulse 3s ease-in-out infinite;
}

.arch-portal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.portal-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
            rgba(0, 229, 255, 0.6) 0%,
            rgba(0, 229, 255, 0.2) 50%,
            transparent 100%);
    border-radius: 50%;
    animation: corePulse 2s ease-in-out infinite;
}

.portal-rings {
    position: relative;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 229, 255, 0.4);
    border-radius: 50%;
    animation: ringSpin 10s linear infinite;
}

.ring:nth-child(1) {
    width: 60px;
    height: 60px;
}

.ring:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-duration: 15s;
    animation-direction: reverse;
}

.ring:nth-child(3) {
    width: 140px;
    height: 140px;
    animation-duration: 20s;
}

.gateway-message {
    text-align: center;
    max-width: 500px;
}

.gateway-message h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.gateway-message p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* Gateway Form (Right Side) */
.gateway-form {
    background: rgba(10, 25, 45, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 24px;
    padding: 40px;
    max-width: 550px;
}

/* Form Header */
.form-header {
    margin-bottom: 40px;
    text-align: center;
}

.form-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.2;
    background: linear-gradient(135deg,
            #fff 0%,
            var(--event-horizon) 50%,
            var(--accretion-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    animation: subtitleShimmer 4s ease-in-out infinite;
}

@keyframes subtitleShimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}


/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.form-label i {
    color: var(--event-horizon);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 27, 45, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: 'Satoshi', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--event-horizon);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-trail {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--event-horizon), var(--accretion-gold));
    transition: width 0.3s ease;
}

.form-input:focus+.input-trail {
    width: 100%;
}

.show-key {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.3s ease;
}

.show-key:hover {
    color: var(--event-horizon);
}

.input-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

/* Form Option */
.form-option {
    margin-bottom: 24px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.option-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.option-label input:checked~.checkmark {
    background: var(--event-horizon);
    border-color: var(--event-horizon);
}

.option-label input:checked~.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 0.9rem;
    font-weight: bold;
}

.option-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Energy Indicator */
.energy-indicator {
    margin-bottom: 24px;
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.energy-value {
    color: var(--event-horizon);
    font-weight: 600;
}

.energy-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--event-horizon), var(--accretion-gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.energy-pulse {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: energyPulseAnim 2s infinite;
}

/* Gateway Submit */
.gateway-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--event-horizon), #0088cc);
    border: none;
    border-radius: 12px;
    color: black;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.submit-glow {
    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;
}

.gateway-submit:hover .submit-glow {
    left: 100%;
}

.gateway-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 229, 255, 0.4);
}

.gateway-submit:active {
    transform: translateY(0);
}

.submit-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-loader {
    display: none;
    gap: 8px;
    justify-content: center;
}

.gateway-submit.loading .submit-text {
    display: none;
}

.gateway-submit.loading .submit-loader {
    display: flex;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: black;
    border-radius: 50%;
    animation: loaderBounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

/* Form Links */
.form-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--event-horizon);
    color: var(--event-horizon);
}

.form-link.alt {
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.2);
    justify-content: space-between;
}

.link-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.link-main {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.link-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Form Footer */
.form-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.warning-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 165, 0, 0.8);
    margin-bottom: 16px;
    line-height: 1.4;
}

.warning-text i {
    margin-top: 2px;
}

.security-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.security-item i {
    color: var(--event-horizon);
}

/* Quantum Transition Overlay */
.quantum-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cosmic-deep);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.quantum-transition.active {
    display: flex;
}

.transition-sequence {
    text-align: center;
}

.sequence-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.8), 0 0 20px rgba(138, 43, 226, 0.5);
    opacity: 0;
    margin-bottom: 20px;
}

.sequence-text::before {
    content: attr(data-text);
}

/* Animations */
@keyframes gridFlow {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50px);
    }
}

@keyframes energyPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes archPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes corePulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes ringSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes energyPulseAnim {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes loaderBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .gateway-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gateway-visual {
        order: 2;
    }

    .gateway-form {
        order: 1;
    }

    .gateway-arch {
        width: 300px;
        height: 400px;
    }

    .arch-frame {
        width: 240px;
        height: 320px;
    }

    .arch-energy {
        width: 260px;
        height: 340px;
    }
}

@media (max-width: 768px) {
    .gateway-container {
        padding: 20px;
    }

    .gateway-form {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .gateway-message h2 {
        font-size: 1.5rem;
    }

    .gateway-visual {
        display: none;
    }
}

@media (max-width: 480px) {
    .form-subtitle {
        font-size: 1.75rem;
    }

    .gateway-submit {
        font-size: 1rem;
        padding: 16px;
    }
}