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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.register-container {
    min-height: 100vh;
    display: flex;
    position: relative;
}

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

.bg-animation {
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 25% 75%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: backgroundMove 25s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    33% { transform: translate(-50%, -50%) rotate(120deg) scale(1.1); }
    66% { transform: translate(-50%, -50%) rotate(240deg) scale(0.9); }
}

/* Content */
.register-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* Header */
.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateX(-5px);
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    color: #aaa;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.lang-btn.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
}

.lang-btn:hover:not(.active) {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Container */
.register-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 45px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.register-brand {
    text-align: center;
    margin-bottom: 35px;
}

.register-brand h1 {
    color: #00d4ff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.register-brand p {
    color: #ccc;
    font-size: 1rem;
}

.register-brand .brand-logo {
    height: 80px;
    width: auto;
    max-width: 200px;
    margin-bottom: 8px;
}

.register-form-wrapper h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.register-subtitle {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}

.alert-error {
    background: rgba(255, 99, 99, 0.12);
    border: 1px solid rgba(255, 99, 99, 0.3);
    color: #ff6363;
}

.alert-success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: #aaa;
    z-index: 2;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 16px 18px 16px 52px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #666;
}

.input-wrapper input:focus {
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.password-toggle {
    position: absolute;
    right: 18px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #00d4ff;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #00d4ff;
    border-color: #00d4ff;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Register Button */
.register-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 14px;
    padding: 18px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.register-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

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

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

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.register-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.register-footer p {
    color: #aaa;
    font-size: 0.9rem;
}

.login-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #0099cc;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
    height: 3px;
}

.strength-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-bar.weak { background: #ff6363; }
.strength-bar.medium { background: #ffa726; }
.strength-bar.strong { background: #66bb6a; }

.password-requirements {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #aaa;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.requirement.met {
    color: #66bb6a;
}

.requirement.met::before {
    content: "✓";
    color: #66bb6a;
}

.requirement:not(.met)::before {
    content: "○";
    color: #aaa;
}

/* Input Validation Styles */
.input-wrapper input.error {
    border-color: #ff6363 !important;
    box-shadow: 0 0 0 3px rgba(255, 99, 99, 0.1) !important;
}

.input-wrapper input.success {
    border-color: #66bb6a !important;
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .register-brand .brand-logo {
        height: 65px;
        max-width: 160px;
    }

    .register-content {
        padding: 20px 15px;
    }

    .register-form-container {
        padding: 35px 30px;
        margin: 20px 0;
        border-radius: 20px;
    }

    .register-brand h1 {
        font-size: 2.2rem;
    }

    .register-form-wrapper h2 {
        font-size: 1.6rem;
    }

    .register-header {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .register-content {
        padding: 15px 10px;
    }

    .register-form-container {
        padding: 30px 25px;
        border-radius: 18px;
    }

    .register-header {
        margin-bottom: 25px;
        flex-direction: column;
        gap: 15px;
    }

    .back-link {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .input-wrapper input {
        padding: 14px 16px 14px 48px;
        font-size: 0.95rem;
    }

    .register-btn {
        padding: 16px;
        font-size: 1rem;
    }

    .form-group {
        gap: 8px;
    }

    .register-form {
        gap: 20px;
    }
}

/* Animation for form elements */
.form-group {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-options { animation: fadeInUp 0.6s ease 0.6s forwards; opacity: 0; }
.register-btn { animation: fadeInUp 0.6s ease 0.7s forwards; opacity: 0; }
.register-footer { animation: fadeInUp 0.6s ease 0.8s forwards; opacity: 0; }

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

/* Focus states for accessibility */
.register-btn:focus-visible,
.back-link:focus-visible,
.lang-btn:focus-visible,
.login-link:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.input-wrapper input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

/* Loading state for form */
.register-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Success animation */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 212, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    z-index: 1000;
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}