/* Gift Exchange Lottery - Main Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #4A4A4A;
    background-color: #F7F5F3;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #8B5A5A;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 600;
    letter-spacing: -0.02em;
}

header p {
    color: #6B6B6B;
    font-size: 1.1em;
    font-weight: 400;
}

/* Form Container */
.form-container {
    background: #FFFFFF;
    padding: 32px;
    border: 1px solid #E8E5E1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4A4A4A;
}

.form-section h3 {
    color: #8B5A5A;
    margin-bottom: 16px;
    border-bottom: 1px solid #D4B896;
    padding-bottom: 8px;
    font-weight: 600;
}

/* Input Styles */
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D0C7B8;
    background-color: #FAFAFA;
    font-size: 16px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #8B5A5A;
    background-color: #FFFFFF;
}

/* Validation States */
input.invalid {
    border-color: #B85450;
    background-color: #FAF5F5;
}

input.valid {
    border-color: #7A8471;
    background-color: #F7F9F7;
}

/* Member Row Styles */
.member-row {
    margin-bottom: 16px;
    padding: 20px;
    background-color: #F9F8F6;
    border-left: 3px solid #7A8471;
    border: 1px solid #E8E5E1;
}

.member-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.member-fields input {
    margin: 0;
}

/* Button Styles */
.add-btn,
.submit-btn,
.remove-member-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn {
    background-color: #7A8471;
    color: white;
    width: 100%;
    margin-top: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-btn:hover {
    background-color: #6B7562;
    transform: translateY(-1px);
}

.submit-btn {
    background-color: #8B5A5A;
    color: white;
    width: 100%;
    font-size: 18px;
    padding: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background-color: #7A4F4F;
    transform: translateY(-1px);
}

.remove-member-btn {
    background-color: #B85450;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-member-btn:hover {
    background-color: #A64B47;
    transform: scale(1.05);
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
}

/* Error Message Styles */
.error-message {
    background-color: #FAF5F5;
    color: #B85450;
    padding: 16px;
    border-left: 3px solid #B85450;
    margin-top: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

/* Success Message Styles */
.success-message {
    background-color: #F7F9F7;
    color: #7A8471;
    padding: 16px;
    border-left: 3px solid #7A8471;
    margin-top: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

/* Confirmation Page Styles */
.confirmation-container {
    background: #FFFFFF;
    padding: 32px;
    border: 1px solid #E8E5E1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.group-info {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background-color: #F9F8F6;
    border-left: 3px solid #D4B896;
    border: 1px solid #E8E5E1;
}

.group-info h2 {
    color: #8B5A5A;
    margin: 0;
    font-weight: 600;
}

.members-list h3 {
    color: #8B5A5A;
    margin-bottom: 20px;
    border-bottom: 1px solid #D4B896;
    padding-bottom: 8px;
    font-weight: 600;
}

.member-confirm-row {
    margin-bottom: 16px;
    padding: 20px;
    background-color: #F7F9F7;
    border-left: 3px solid #7A8471;
    border: 1px solid #E8E5E1;
}

.member-info {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 15px;
    align-items: center;
}

.member-info label {
    font-weight: 500;
    color: #4A4A4A;
    margin: 0;
}

.back-btn {
    background-color: #D4B896;
    color: white;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background-color: #C7AB87;
    transform: translateY(-1px);
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.shake-on-hover:hover {
    animation: shake 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 95%;
    }
    
    .form-container,
    .confirmation-container {
        padding: 20px;
        margin: 10px 0;
    }
    
    .member-fields {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .remove-member-btn {
        justify-self: end;
        width: 35px;
        height: 35px;
        margin-top: 5px;
    }
    
    header h1 {
        font-size: 2em;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 1em;
    }
    
    .member-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .member-info label {
        margin-top: 10px;
        font-size: 0.95em;
    }
    
    .member-info label:first-child {
        margin-top: 0;
    }
    
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .back-btn {
        margin-right: 0;
        order: 2;
    }
    
    /* Mobile-specific button adjustments */
    .add-btn,
    .submit-btn {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 48px; /* Touch-friendly size */
    }
    
    /* Shopping links responsive */
    .shopping-links {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .shopping-link {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header h1 {
        font-size: 1.8em;
        line-height: 1.2;
    }
    
    .form-container,
    .confirmation-container {
        padding: 15px;
    }
    
    .form-section h3 {
        font-size: 1.1em;
    }
    
    input[type="text"],
    input[type="email"] {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .member-row {
        padding: 12px;
    }
    
    .add-btn,
    .submit-btn,
    .back-btn {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 50px;
    }
    
    .remove-member-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    /* Smaller text on very small screens */
    .help-text {
        font-size: 0.8em;
    }
    
    .platform-desc {
        font-size: 0.8em;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 5px;
    }
    
    .form-container,
    .confirmation-container {
        padding: 12px;
    }
    
    header h1 {
        font-size: 1.6em;
    }
    
    .form-section h3 {
        font-size: 1em;
    }
}
/* 
Success Page Styles */
.success-message {
    text-align: center;
    margin-bottom: 30px;
}

.success-message h2 {
    color: #7A8471;
    margin-bottom: 16px;
    font-size: 2em;
    font-weight: 600;
}

.success-message p {
    margin-bottom: 12px;
    color: #4A4A4A;
    font-weight: 400;
}

.shopping-guidance {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #F9F8F6;
    border-left: 3px solid #D4B896;
    border: 1px solid #E8E5E1;
}

.shopping-guidance h3 {
    color: #8B5A5A;
    margin-bottom: 16px;
    font-size: 1.5em;
    text-align: center;
    font-weight: 600;
}

.shopping-guidance p {
    color: #4A4A4A;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
}

.shopping-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shopping-link {
    display: block;
    padding: 20px;
    background-color: #FFFFFF;
    text-decoration: none;
    color: #4A4A4A;
    border: 1px solid #D4B896;
    transition: all 0.2s ease;
    text-align: center;
}

.shopping-link:hover {
    border-color: #8B5A5A;
    transform: translateY(-2px);
    background-color: #FAFAFA;
}

.platform-name {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 6px;
    color: #8B5A5A;
}

.platform-desc {
    display: block;
    font-size: 0.9em;
    color: #6B6B6B;
    font-weight: 400;
}

.support-section {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #F7F9F7;
    border-left: 3px solid #7A8471;
    text-align: center;
    border: 1px solid #E8E5E1;
}

.support-section h3 {
    color: #7A8471;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 600;
}

.support-section p {
    color: #4A4A4A;
    margin-bottom: 16px;
    font-weight: 400;
}

.resend-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #7A8471;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.resend-link:hover {
    background-color: #6B7562;
    transform: translateY(-1px);
}

/* Success Page Responsive Design */
@media (max-width: 768px) {
    .shopping-links {
        grid-template-columns: 1fr;
    }
    
    .shopping-guidance {
        padding: 20px;
    }
    
    .support-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .success-message h2 {
        font-size: 1.5em;
    }
    
    .shopping-guidance h3 {
        font-size: 1.3em;
    }
    
    .support-section h3 {
        font-size: 1.2em;
    }
}

/* Resend Page Styles */
.help-text {
    display: block;
    margin-top: 6px;
    color: #6B6B6B;
    font-size: 0.9em;
    font-style: italic;
}

.help-section {
    margin-top: 32px;
    padding: 24px;
    background-color: #F9F8F6;
    border-left: 3px solid #D4B896;
    border: 1px solid #E8E5E1;
}

.help-section h3 {
    color: #8B5A5A;
    margin-bottom: 16px;
    font-size: 1.2em;
    font-weight: 600;
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: #4A4A4A;
    line-height: 1.6;
    font-weight: 400;
}

.help-list li:before {
    content: "•";
    color: #D4B896;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.navigation-section {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.back-link {
    color: #8B5A5A;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #7A4F4F;
    text-decoration: underline;
}

/* Enhanced Form Field States */
.field-focused {
    transform: scale(1.01);
    transition: transform 0.2s ease;
}

input.duplicate {
    border-color: #D4B896 !important;
    background-color: #F9F8F6;
}

.field-error {
    animation: slideIn 0.3s ease;
}

/* Loading States */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Enhanced Button States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover {
    transform: none !important;
}

/* Member Counter Styles */
#member-counter {
    font-size: 0.9em;
    color: #4A4A4A;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 500;
    background-color: #F9F8F6;
    padding: 8px 16px;
    border: 1px solid #D4B896;
}

/* Confirmation Dialog Styles */
.confirmation-overlay {
    backdrop-filter: blur(2px);
}

.confirmation-dialog {
    animation: scaleIn 0.3s ease-out;
}

.confirmation-dialog button:hover {
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background-color: #C7AB87 !important;
    color: white !important;
}

.confirm-btn:hover {
    background-color: #7A4F4F !important;
}

/* Enhanced Validation States */
input.valid {
    border-color: #7A8471;
    background-color: #F7F9F7;
}

input.invalid {
    border-color: #B85450;
    background-color: #FAF5F5;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .field-focused {
        transform: none;
    }
    
    .btn-hover-lift:hover {
        transform: none;
    }
    
    .btn-hover-scale:hover {
        transform: none;
    }
}

/* Focus Indicators for Keyboard Navigation */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #8B5A5A;
    outline-offset: 2px;
}

/* Resend Page Responsive Design */
@media (max-width: 768px) {
    .help-section {
        padding: 15px;
    }
    
    .help-list li {
        font-size: 0.95em;
    }
    
    .confirmation-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .help-section h3 {
        font-size: 1.1em;
    }
    
    .help-text {
        font-size: 0.85em;
    }
    
    .confirmation-dialog {
        padding: 20px;
        margin: 10px;
    }
    
    .confirmation-dialog div {
        flex-direction: column;
    }
    
    .confirmation-dialog button {
        width: 100%;
        margin: 5px 0;
    }
}
/
* Footer Styles */
.site-footer {
    background-color: #8B5A5A;
    color: #FFFFFF;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.footer-content a {
    color: #FFE4E1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-links {
    margin-top: 15px;
    font-size: 0.9em;
}

.footer-links .separator {
    margin: 0 10px;
    color: #D4A5A5;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 25px 0;
        margin-top: 30px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-content p {
        font-size: 0.9em;
    }
    
    .footer-links {
        margin-top: 12px;
    }
    
    .footer-links .separator {
        margin: 0 8px;
    }
}/* Foote
r Styles - 簡潔版本 */
.site-footer {
    background: linear-gradient(135deg, #F7F5F3 0%, #E8E5E1 100%);
    border-top: 1px solid #D4C4B0;
    padding: 25px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 0;
    font-size: 0.9em;
    color: #6B6B6B;
    line-height: 1.4;
    font-weight: 400;
}

.footer-content a {
    color: #8B5A5A;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer-content a:hover {
    color: #A0645A;
    border-bottom-color: #A0645A;
    text-decoration: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 20px 0;
        margin-top: 30px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-content p {
        font-size: 0.85em;
    }
}/
* Form validation styles */
.form-section input.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
}

.form-section input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.field-error {
    color: #e74c3c;
    font-size: 0.85em;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.submit-btn.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}