/* 基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ececec;
}

.wrapper {
    background-color: #ececec;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main {
    width: 100%;
    max-width: 1200px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
}

.row {
    width: 100%;
    max-width: 900px;
    min-height: 550px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    margin: 0;
}

.side-image {
    background-image: url("https://images.unsplash.com/photo-1472074468533-c2cb83695b0e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=869&q=80");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 10px 0 0 10px;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text {
    text-align: center;
    z-index: 2;
}

.text p {
    color: #fff;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin: 0;
}

.text p:last-child {
    font-size: 16px;
    margin-top: 15px;
    opacity: 0.9;
}

.right {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 550px;
}

.input-box {
    width: 100%;
    max-width: 350px;
}

.input-box header {
    font-weight: 700;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.input-field {
    position: relative;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.input-field:nth-child(1) { animation-delay: 0.1s; }
.input-field:nth-child(2) { animation-delay: 0.2s; }
.input-field:nth-child(3) { animation-delay: 0.3s; }
.input-field:nth-child(4) { animation-delay: 0.4s; }

.input {
    width: 100%;
    height: 45px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #ddd;
    outline: none;
    color: #333;
    font-size: 16px;
    padding: 10px 0;
    transition: border-color 0.3s ease;
}

.input:focus {
    border-bottom-color: #5d5076;
}

.input-field label {
    position: absolute;
    top: 12px;
    left: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    color: #666;
    font-size: 16px;
}

.input:focus ~ label,
.input:valid ~ label {
    top: -15px;
    font-size: 13px;
    color: #5d5076;
    font-weight: 500;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 12px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #333;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    min-height: 15px;
    display: block;
}

.password-strength {
    font-size: 12px;
    margin-top: 5px;
    min-height: 15px;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    gap: 10px;
}

.checkbox-field input[type="checkbox"] {
    margin: 0;
    width: auto;
    height: auto;
    margin-top: 2px;
}

.checkbox-field label {
    font-size: 14px;
    margin: 0;
    position: static;
    color: #666;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-field a {
    color: #5d5076;
    text-decoration: none;
}

.checkbox-field a:hover {
    text-decoration: underline;
}

.submit {
    width: 100%;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit:active {
    transform: translateY(0);
}

.signin {
    text-align: center;
    font-size: 14px;
    margin-top: 25px;
}

.signin a {
    color: #5d5076;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signin a:hover {
    color: #333;
    text-decoration: underline;
}

.social-login {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.social-login p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-btn.google:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.social-btn.facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media only screen and (max-width: 768px) {
    .wrapper {
        padding: 10px;
    }
    
    .row {
        max-width: 100%;
        min-height: auto;
        flex-direction: column;
    }
    
    .side-image {
        border-radius: 10px 10px 0 0;
        min-height: 200px;
        order: 1;
    }
    
    .right {
        order: 2;
        padding: 30px 20px;
        min-height: auto;
    }
    
    .text p {
        font-size: 22px;
    }
    
    .text p:last-child {
        font-size: 14px;
    }
    
    .input-box {
        max-width: 100%;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 200px;
        justify-content: center;
    }
    
    .checkbox-field {
        align-items: flex-start;
    }
    
    .checkbox-field label {
        font-size: 13px;
    }
}

@media only screen and (max-width: 480px) {
    .wrapper {
        padding: 5px;
    }
    
    .right {
        padding: 20px 15px;
    }
    
    .input-box header {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .text p {
        font-size: 20px;
    }
}