/* Background Animation */
.register-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    opacity: 0.25;
    animation: float 20s infinite linear;
}

.bg-shape-1 {
    top: 10%;
    left: 10%;
    width: 180px;
    height: 180px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 24px;
    animation: float1 25s infinite linear;
}

.bg-shape-2 {
    top: 20%;
    right: 15%;
    width: 160px;
    height: 160px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float2 30s infinite linear;
}

.bg-shape-3 {
    top: 60%;
    left: 20%;
    width: 140px;
    height: 140px;
    background: linear-gradient(45deg, #a8e6cf, #7fcdcd);
    border-radius: 50%;
    animation: float3 28s infinite linear;
}

.bg-shape-4 {
    top: 30%;
    left: 60%;
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #ffd93d, #ff6b6b);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float4 32s infinite linear;
}

.bg-shape-5 {
    top: 70%;
    right: 25%;
    width: 170px;
    height: 170px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    border-radius: 30px;
    animation: float5 26s infinite linear;
}

.bg-shape-6 {
    top: 15%;
    left: 40%;
    width: 110px;
    height: 110px;
    background: linear-gradient(45deg, #fd79a8, #fdcb6e);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    animation: float6 35s infinite linear;
}

.bg-shape-7 {
    top: 80%;
    left: 70%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-radius: 18px;
    animation: float7 29s infinite linear;
}

.bg-shape-8 {
    top: 45%;
    right: 10%;
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #e84393, #fd79a8);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    animation: float8 31s infinite linear;
}

@keyframes float1 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    25% { transform: translateY(-40px) rotate(90deg) scale(1.1); opacity: 0.35; }
    50% { transform: translateY(-20px) rotate(180deg) scale(0.9); opacity: 0.25; }
    75% { transform: translateY(-60px) rotate(270deg) scale(1.05); opacity: 0.35; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float2 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    33% { transform: translateY(-50px) rotate(120deg) scale(1.2); opacity: 0.4; }
    66% { transform: translateY(-10px) rotate(240deg) scale(0.8); opacity: 0.2; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float3 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    20% { transform: translateY(-30px) rotate(72deg) scale(1.15); opacity: 0.35; }
    40% { transform: translateY(-60px) rotate(144deg) scale(0.85); opacity: 0.2; }
    60% { transform: translateY(-20px) rotate(216deg) scale(1.1); opacity: 0.35; }
    80% { transform: translateY(-50px) rotate(288deg) scale(0.95); opacity: 0.25; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float4 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    25% { transform: translateY(-45px) rotate(90deg) scale(1.25); opacity: 0.4; }
    50% { transform: translateY(-15px) rotate(180deg) scale(0.75); opacity: 0.15; }
    75% { transform: translateY(-55px) rotate(270deg) scale(1.1); opacity: 0.35; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float5 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    30% { transform: translateY(-35px) rotate(108deg) scale(1.3); opacity: 0.45; }
    60% { transform: translateY(-25px) rotate(216deg) scale(0.7); opacity: 0.1; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float6 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    16% { transform: translateY(-40px) rotate(60deg) scale(1.2); opacity: 0.4; }
    32% { transform: translateY(-10px) rotate(120deg) scale(0.8); opacity: 0.15; }
    48% { transform: translateY(-50px) rotate(180deg) scale(1.1); opacity: 0.35; }
    64% { transform: translateY(-20px) rotate(240deg) scale(0.9); opacity: 0.25; }
    80% { transform: translateY(-45px) rotate(300deg) scale(1.15); opacity: 0.4; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float7 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    14% { transform: translateY(-55px) rotate(50deg) scale(1.4); opacity: 0.5; }
    28% { transform: translateY(-15px) rotate(100deg) scale(0.6); opacity: 0.1; }
    42% { transform: translateY(-65px) rotate(150deg) scale(1.2); opacity: 0.4; }
    56% { transform: translateY(-25px) rotate(200deg) scale(0.8); opacity: 0.2; }
    70% { transform: translateY(-45px) rotate(250deg) scale(1.1); opacity: 0.35; }
    84% { transform: translateY(-35px) rotate(300deg) scale(0.9); opacity: 0.25; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

@keyframes float8 {
    0% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.25; }
    12% { transform: translateY(-50px) rotate(45deg) scale(1.35); opacity: 0.45; }
    24% { transform: translateY(-20px) rotate(90deg) scale(0.65); opacity: 0.1; }
    36% { transform: translateY(-60px) rotate(135deg) scale(1.25); opacity: 0.4; }
    48% { transform: translateY(-10px) rotate(180deg) scale(0.75); opacity: 0.15; }
    60% { transform: translateY(-40px) rotate(225deg) scale(1.15); opacity: 0.35; }
    72% { transform: translateY(-30px) rotate(270deg) scale(0.85); opacity: 0.2; }
    84% { transform: translateY(-55px) rotate(315deg) scale(1.05); opacity: 0.3; }
    100% { transform: translateY(0px) rotate(360deg) scale(1); opacity: 0.25; }
}

/* Registration Page Styles */
.register-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.register-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Header */
.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.register-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--neutral-100);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input.error {
    border-color: var(--error-500);
    box-shadow: 0 0 0 3px var(--error-100);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

/* Error Messages */
.form-error {
    font-size: 0.75rem;
    color: var(--error-500);
    min-height: 1rem;
    display: flex;
    align-items: center;
}

/* Password Match Indicator */
.password-match-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--neutral-100);
}

.password-match-indicator.matching {
    color: var(--success-600);
    background: var(--success-50);
    border: 1px solid var(--success-200);
}

.password-match-indicator.not-matching {
    color: var(--error-600);
    background: var(--error-50);
    border: 1px solid var(--error-200);
}

.password-match-indicator.neutral {
    color: var(--text-muted);
    background: var(--neutral-100);
    border: 1px solid var(--neutral-200);
}

.match-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-icon svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-match-indicator.matching .match-icon svg {
    color: var(--success-600);
}

.password-match-indicator.not-matching .match-icon svg {
    color: var(--error-600);
}

.password-match-indicator.neutral .match-icon svg {
    color: var(--text-muted);
}



/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    flex-shrink: 0;
    margin-top: 0.125rem;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
}

/* Links */
.link {
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Register Button */
.register-button {
    background: var(--primary-600);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.register-button:hover:not(:disabled) {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.register-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-loading {
    display: none;
    animation: spin 1s linear infinite;
}

.register-button.loading .button-text {
    display: none;
}

.register-button.loading .button-loading {
    display: block;
}

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

/* Footer */
.register-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.login-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 640px) {
    .register-section {
        padding: 1rem 1rem 2rem 1rem;
        min-height: calc(100vh - 120px);
    }
    
    .register-container {
        padding: 2rem 1.5rem;
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 12px;
    }
    
    .register-title {
        font-size: 1.75rem;
    }
    
    .register-subtitle {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .register-section {
        padding: 3.5rem 0.7rem 5rem 0.7rem;
        min-height: calc(100vh - 100px);
    }
    
    .register-container {
        padding: 1.5rem 1rem;
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 8px;
    }
    
    .register-title {
        font-size: 1.5rem;
    }
}

/* Tablet/iPad specific adjustments */
@media (min-width: 481px) and (max-width: 1024px) {
    .register-section {
        padding: 1.5rem 1rem 2.5rem 1rem;
        min-height: calc(100vh - 140px);
    }
}
