/* Particles.js Background */
#particles-background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0a0f1e 0%, #1e293b 50%, #0f172a 100%);
}

/* Global Styles for Login/Verify Pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Login Page Styles */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.15); 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); 
    position: relative;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.info-panel {
    max-width: 550px;
    color: white;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.logo-shape {
    width: 5.175rem;
    height: 5.175rem;
    transform-style: preserve-3d;
    flex-shrink: 0;
}

.logo-shape svg {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.brand-text h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text .tagline {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
    color: #e0e7ff;
}

/* Base ring styling */
.ring {
    fill: none;
    stroke-width: 1.5px;
    stroke-linecap: round;
    stroke-dasharray: 2 6;
    transform-box: fill-box;
    transform-origin: center center;
}

/* Gradient rings: 1 & 3 */
.ring1,
.ring3 {
    stroke: url(#grad);
    filter: drop-shadow(0 0 4px #97e14d);
}

/* Purple rings: 2 & 4 */
.ring2,
.ring4 {
    stroke: #0ea5e9;
    filter: drop-shadow(0 0 2px #0ea5e9);
}

/* Ring 1: tilt X, spin around Z in 8s, dots orbit */
.ring1 {
    transform: rotateX(60deg);
    animation:
            spin1 8s linear infinite,
            dash1 0.6s linear infinite;
}
@keyframes spin1 {
    to { transform: rotateX(60deg) rotateZ(360deg); }
}
@keyframes dash1 {
    to { stroke-dashoffset: -10; }
}

/* Ring 2: tilt Y, spin around Z (rev) in 6s, dots orbit rev */
.ring2 {
    transform: rotateY(60deg);
    animation:
            spin2 6s linear infinite reverse,
            dash2 0.5s linear infinite reverse;
}
@keyframes spin2 {
    to { transform: rotateY(60deg) rotateZ(-360deg); }
}
@keyframes dash2 {
    to { stroke-dashoffset: 10; }
}

/* Ring 3: tilt Z+X, spin around Y in 5s, dots orbit */
.ring3 {
    transform: rotateZ(60deg) rotateX(30deg);
    animation:
            spin3 5s linear infinite,
            dash3 0.7s linear infinite;
}
@keyframes spin3 {
    to { transform: rotateZ(60deg) rotateX(30deg) rotateY(360deg); }
}
@keyframes dash3 {
    to { stroke-dashoffset: -10; }
}

/* Ring 4: tilt Y+X, spin around X in 7s, dots orbit */
.ring4 {
    transform: rotateY(-45deg) rotateX(30deg);
    animation:
            spin4 7s linear infinite,
            dash4 0.4s linear infinite;
}
@keyframes spin4 {
    to { transform: rotateY(-45deg) rotateX(30deg) rotateZ(360deg); }
}
@keyframes dash4 {
    to { stroke-dashoffset: 10; }
}

.info-panel h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.info-panel > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(20px);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.logo-section p {
    color: #6b7280;
    font-size: 0.875rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #6b7280;
}

.form-control {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0 10px 10px 0;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: #0ea5e9;
}

.btn-back {
    margin-top: 0.5rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #374151;
}

.input-group .form-control:focus {
    border-color: #0ea5e9;
}

/* Note: The input-group-text border color cannot be changed via CSS when
   form-control is focused due to CSS limitations (can't select previous siblings).
   This would require JavaScript to implement. */

.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

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

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

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider::before {
    margin-right: 0.5rem;
}

.divider::after {
    margin-left: 0.5rem;
}

.btn-google {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    border-color: #0ea5e9;
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* Verify Page Styles */
.verify-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.verify-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.verify-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.security-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: white;
}

.security-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.verify-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
}

.header-section {
    text-align: center;
    margin-bottom: 2rem;
}

.header-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.header-section p {
    color: #6b7280;
    font-size: 0.875rem;
}

.otp-input {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5rem;
    transition: border-color 0.2s;
    outline: none;
    margin-bottom: 1.5rem;
}

.otp-input:focus {
    border-color: #0ea5e9;
}

.otp-input::placeholder {
    color: #d1d5db;
    letter-spacing: 0.5rem;
}

.btn-verify {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper,
    .verify-wrapper {
        flex-direction: column;
    }
    
    .login-left,
    .verify-left {
        min-height: 40vh;
    }
    
    .login-right,
    .verify-right {
        min-height: 60vh;
    }
    
    .info-panel h2 {
        font-size: 2rem;
    }
    
    .login-card,
    .verify-card {
        padding: 2rem;
    }
}
