* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(123, 31, 162, 0.05) 0%, transparent 100%),
        linear-gradient(rgba(0, 0, 0, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 2px, transparent 2px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    background-position: 0 0, 0 0, 0 0;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #9c27b0 0%, transparent 70%);
    opacity: 0.03;
    animation: rotate 30s linear infinite;
    z-index: -1;
    filter: blur(80px);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    z-index: 2;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lock-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 8px rgba(123, 31, 162, 0.5));
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #6b7280 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #7b1fa2;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(123, 31, 162, 0.2);
}

.form-section-title:first-child {
    margin-top: 0;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #6b7280;
    font-size: 1.2rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Unbounded', sans-serif;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.input-group textarea {
    resize: none;
    min-height: 120px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #7b1fa2;
    background: white;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: white;
    border-color: #7b1fa2;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #6b7280;
    border-radius: 6px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
    border-color: #7b1fa2;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
}

.checkbox-text {
    font-size: 0.9rem;
    color: #1a1a1a;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Unbounded', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    text-decoration: none;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.success-content {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.success-content p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #7b1fa2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.9rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .checkbox-group {
        gap: 0.5rem;
    }

    .checkbox-label {
        padding: 0.6rem;
    }
}
