:root {
    --primary-color: #00f2ff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #050510;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Login Container - Initially Hidden */
.login-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Centered */
    gap: 80px; /* Space between text and box */
    z-index: 2;
    transition: opacity 1.5s ease-in-out;
    padding: 0 50px; /* Prevent edge touching */
    box-sizing: border-box;
}

.input-group.with-action input {
    padding-right: 120px;
}

.sms-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 198, 255, 0.2);
    color: #7dd3fc;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.sms-btn:hover {
    background: rgba(0, 198, 255, 0.35);
}

.sms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.agreement {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

/* Brand Text Styling */
.brand-text {
    max-width: 500px;
    color: #fff;
    text-align: left;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInText 1s ease 0.3s forwards; /* Slight delay after box */
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

.brand-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 25px 0;
    line-height: 1.3;
}

.brand-text .highlight {
    color: #00f2ff;
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.brand-text p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin: 0;
}

@keyframes slideInText {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.login-box {
    width: 380px;
    padding: 40px;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* border: 1px solid var(--glass-border); Removed base border as per new design */
    border-radius: 15px;
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    transform: translateY(20px);
    opacity: 0;
    animation: floatUp 1s ease forwards;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Ensure pseudo-elements are relative to this */
}

/* Hover Effect: Flowing Energy Border */
.login-box {
    /* Existing styles need to be maintained, but we need to ensure border is handled by pseudo */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Default subtle border */
}

/* Hover Effect: Symmetrical Solid Expansion */
.login-box {
    /* Base subtle border */
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative; /* Ensure pseudos are positioned */
    
    /* Transition for base border fade out */
    transition: border-color 0.3s ease, box-shadow 0.5s ease;
}

/* Horizontal Lines (Top & Bottom) */
.login-box::before {
    content: '';
    position: absolute;
    inset: -1px; /* Cover original border */
    border-radius: 15px; /* Match container */
    
    /* Solid Bright Lines */
    border-top: 1px solid #00f2ff;
    border-bottom: 1px solid #00f2ff;
    
    /* Start from center horizontally */
    clip-path: inset(0 50% 0 50%);
    
    transition: clip-path 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    z-index: 1;
}

/* Vertical Lines (Left & Right) */
.login-box::after {
    content: '';
    position: absolute;
    inset: -1px; /* Cover original border */
    border-radius: 15px; /* Match container */
    
    /* Solid Bright Lines */
    border-left: 1px solid #00f2ff;
    border-right: 1px solid #00f2ff;
    
    /* Start from center vertically */
    clip-path: inset(50% 0 50% 0);
    
    transition: clip-path 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    z-index: 1;
}

.login-box:hover {
    /* Fade out the static border */
    border-color: rgba(255, 255, 255, 0);
    
    /* Add Ethereal Glow */
    box-shadow: 
        0 0 15px rgba(0, 242, 255, 0.3), /* Outer glow */
        inset 0 0 20px rgba(0, 242, 255, 0.1); /* Inner depth */
}

.login-box:hover::before {
    /* Expand Width */
    clip-path: inset(0 0 0 0);
}

.login-box:hover::after {
    /* Expand Height */
    clip-path: inset(0 0 0 0);
}

/* Only animate box when container becomes visible */
.login-container[style*="opacity: 1"] .login-box {
    opacity: 1;
    transform: translateY(0);
}

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

.login-box h2 {
    text-align: left;
    margin-bottom: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.login-message {
    height: 20px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    color: #ff4d4d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-message.success {
    color: #00ff88;
}

.login-message.visible {
    opacity: 1;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.login-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.login-tab.active {
    color: #0b1120;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border-color: transparent;
    font-weight: 600;
}

.login-panel {
    display: none;
}

.login-panel.active {
    display: block;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.input-group input:focus + i {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.form-options a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.form-options a:hover {
    opacity: 0.8;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
}

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

.switch-login-entry {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
}

.switch-login-entry a {
    color: #7dd3fc;
    text-decoration: none;
}

.switch-login-entry a:hover {
    opacity: 0.85;
}

.enterprise-tip {
    margin-bottom: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        gap: 40px;
        padding: 20px;
    }

    .brand-text {
        text-align: center;
        max-width: 100%;
        margin-top: 40px; /* Push down a bit if needed */
        order: -1; /* Ensure text is above on mobile, or 1 for below */
    }
    
    .brand-text h1 { font-size: 18px; }
    .brand-text h2 { font-size: 28px; }
    .brand-text p { font-size: 14px; }

    .login-box {
        width: 90%;
        margin: 0 20px;
    }
}
