:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --primary-color: #5865F2;
    --primary-hover: #4752c4;
    --input-bg: rgba(1, 4, 9, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(88, 101, 242, 0.5);
    --success-color: #2ea043;
    --error-color: #f85149;

    --blob-1: #c90ce8;
    --blob-2: #5865F2;
    --blob-3: #00ffcc;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animations */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: var(--blob-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background-color: var(--blob-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background-color: var(--blob-3);
    top: 50%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Container & Glass Card */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px -5px rgba(88, 101, 242, 0.4);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--card-bg);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(to right, #fff, #aab2c0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px 16px 16px 48px;
    font-size: 16px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder {
    color: rgba(139, 148, 158, 0.5);
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--input-focus);
}

input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Button */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px 0 rgba(88, 101, 242, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.loader {
    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;
    position: absolute;
}

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

.hidden {
    display: none !important;
}

/* Status Message */
.status-message {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.success {
    background: rgba(46, 160, 67, 0.1);
    border: 1px solid rgba(46, 160, 67, 0.3);
    color: var(--success-color);
}

.status-message.error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--error-color);
}

.status-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.success .status-icon {
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%232ea043" stroke-width="2" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17l-5-5"/></svg>') no-repeat center/contain;
}

.error .status-icon {
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%23f85149" stroke-width="2" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M15 9l-6 6M9 9l6 6"/></svg>') no-repeat center/contain;
}

/* Footer Note */
.footer-note {
    margin-top: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 360px;
    text-align: center;
    padding: 30px 24px;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: none;
    /* override default glass-card animation */
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.confirm-email-box {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-actions .btn-primary {
    flex: 1;
    padding: 14px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 480px) {
    .glass-card {
        padding: 30px 20px;
    }
}