.register-container,
.register-card {
    --primary-color: #e74c8c;
    --primary-dark: #d43d7a;
    --primary-light: #f66fa4;
    --secondary-color: #7ac142;
    --top-bar-bg: #5a5a5a;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    color: var(--text-dark);
}


/* Container */
.register-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.register-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    transition: var(--transition);
}

.register-card:hover {
    box-shadow: 0 8px 25px rgba(231, 76, 140, 0.15);
    transform: translateY(-5px);
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-dark));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container img {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(231, 76, 140, 0.3));
    transition: var(--transition);
}

.logo-container img:hover {
    transform: scale(1.05);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    opacity: 0.9;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(231, 76, 140, 0.2);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 140, 0.25);
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 300;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 10;
    transition: var(--transition);
}

.form-control:focus+.input-icon {
    color: var(--primary-color);
}

/* Checkbox */
.form-check {
    margin-bottom: 32px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    border: 2px solid rgba(231, 76, 140, 0.3);
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 140, 0.25);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Submit Button */
.btn-register {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-register:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 140, 0.3);
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:active {
    transform: translateY(0);
}

/* 次要按鈕 (使用綠色) */
.btn-secondary-register {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-secondary-register:hover {
    background: #6ab135;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 193, 66, 0.3);
}

/* 外框按鈕 */
.btn-outline-register {
    width: 100%;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-outline-register:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 140, 0.3);
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(231, 76, 140, 0.2);
}

.login-link p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 0;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Validation Messages */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 8px;
    font-size: 14px;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 8px;
    font-size: 14px;
    color: var(--secondary-color);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: var(--secondary-color);
}

/* 密碼強度指示器 */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #dc3545;
}

.password-strength-bar.medium {
    width: 66%;
    background: #ffc107;
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--secondary-color);
}

.password-strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: var(--text-light);
}

/* 社交註冊按鈕 */
.social-register {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-register-title {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 0.75rem;
    border: 2px solid;
    cursor: pointer;
}

.btn-facebook {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.btn-facebook:hover {
    background: #165ec9;
    border-color: #165ec9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-google {
    background: white;
    color: #333;
    border-color: #ddd;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-line {
    background: #00b900;
    color: white;
    border-color: #00b900;
}

.btn-line:hover {
    background: #009a00;
    border-color: #009a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
}

/* 錯誤訊息 */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* 成功訊息 */
.success-message {
    background: rgba(122, 193, 66, 0.1);
    border: 1px solid rgba(122, 193, 66, 0.3);
    color: var(--secondary-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* 進度步驟 */
.registration-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.registration-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step.completed .step-number {
    background: var(--secondary-color);
    color: white;
}

.step-label {
    font-size: 12px;
    color: var(--text-light);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 576px) {
    .register-card {
        padding: 24px;
        margin: 10px;
        border-radius: 20px;
    }

    .brand-title {
        font-size: 24px;
    }

    .logo {
        max-width: 150px;
    }

    .btn-register,
    .btn-secondary-register,
    .btn-outline-register {
        padding: 0.75rem 1rem;
    }

    .registration-steps {
        margin-bottom: 1.5rem;
    }

    .step-label {
        font-size: 11px;
    }
}

/* Loading State */
.btn-register.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-register.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 淡入動畫 */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}