/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'source-han-sans-traditional', 'Microsoft JhengHei', sans-serif;
    font-weight: 700;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 動畫定義 */
@keyframes treeSway {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    33% { transform: translateX(10px) translateY(-5px); }
    66% { transform: translateX(-5px) translateY(3px); }
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes peopleSway {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(5px); }
}

/* 標題區塊 */
.header-section {
    background-color: #c2e9f5;
    position: relative;
    min-height: 30vh;
    padding: 40px 0 0 0;
}

/* Logo */
.header-logo {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-img {
    width: 280px;
    height: 90px;
    object-fit: contain;
}

/* 背景裝飾元素 - 樹葉 */
.background-tree-left {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 25%; /* 電腦版樹葉寬度 */
}

.background-tree-right {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 25%; /* 電腦版樹葉寬度 */
}

.tree-img {
    width: 100%;
    height: auto;
    animation: treeSway 4s ease-in-out infinite;
}

/* 背景裝飾元素 - 雲朵 */
.background-cloud-left {
    position: absolute;
    top: 20%;
    left: 10%;
    z-index: 1;
    width: 15%; /* 電腦版雲朵寬度 */
}

.background-cloud-right {
    position: absolute;
    top: 15%;
    right: 10%;
    z-index: 1;
    width: 15%; /* 電腦版雲朵寬度 */
}

.cloud-img {
    width: 100%;
    height: auto;
    animation: cloudFloat 6s ease-in-out infinite;
}

/* 標題內容 */
.title-content {
    text-align: center;
    position: relative;
    z-index: 3;
    padding: 2rem 0;
}

.main-title {
    width: 60%; /* 電腦版標題寬度 */
    height: auto;
    margin-bottom: 1rem;
    animation: titlePulse 3s ease-in-out infinite;
}

.event-date {
    width: 50%; /* 電腦版時間寬度 */
    height: auto;
}

/* 活動主文區塊 */
.main-content-section {
    position: relative;
    padding: 0 0;
    background-color: #c2e9f5;
}

/* 草地背景 */
.background-grassland {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    z-index: 1;
    height: 60%;
}

.grassland-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 人物背景 */
.background-people {
    position: absolute;
    bottom: -30px;
    left: 0;
    z-index: 1;
    width: 30%; /* 電腦版人物寬度 */
}

.people-img {
    width: 100%;
    height: auto;
    animation: peopleSway 5s ease-in-out infinite;
}

/* 主文內容 */
.main-text {
    position: relative;
    z-index: 3;
    padding: 2rem;
    border-radius: 10px;
    margin-left: auto;
    width: 100%; /* 電腦版主文寬度 */
    margin-right: 0;
}

/* 填寫資料區塊樣式 */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin: 0rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid #e8f4f8;
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    color: #2e3192;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

.checkpoint-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.checkpoint-summary h3 {
    color: #2e3192;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.checkpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.checkpoint-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #2e3192;
    box-shadow: 0 0 0 3px rgba(46, 49, 146, 0.1);
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2e3192;
}

.radio-item label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.file-upload {
    border: 2px dashed #2e3192;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    background: #f8f9ff;
}

.file-upload input[type="file"] {
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.privacy-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.privacy-section h4 {
    color: #2e3192;
    margin-bottom: 1rem;
    text-align: center;
}

.privacy-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #555;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2e3192;
    margin-top: 0.2rem;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2e3192, #4a4db8);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1a1d6b, #3a3d9a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 49, 146, 0.4);
}

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

.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.success-message h2 {
    color: #155724;
    margin-bottom: 1rem;
}

.success-message p {
    color: #155724;
    margin-bottom: 0.5rem;
}

.error-message {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.error-message h4 {
    color: #721c24;
    margin-bottom: 0.5rem;
}

.error-message ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-message li {
    color: #721c24;
    margin-bottom: 0.25rem;
}

.main-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
}

/* 相關訊息區塊 */
.info-section {
    padding: 2rem 0;
    background-color: #c2e9f5;
}

.info-boxes {
    position: relative;
    z-index: 3;
    padding: 2rem;
    border-radius: 10px;
    margin-left: auto;
    width: 80%; /* 電腦版主文寬度 */
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-box {
    flex: 0 0 calc(25% - 1rem);
    max-width: calc(25% - 1rem);
}

.box-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.info-box:hover .box-img {
    transform: scale(1.05);
}

.info-box a {
    display: block;
    text-decoration: none;
}

/* 裝飾區塊 (手機版專用) */
.decoration-section {
    position: relative;
    height: 300px;
    background-color: #c2e9f5;
}

.background-grassland-mobile {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    height: 80%;
}

.background-people-mobile {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 88%; /* 手機版人物寬度 */
}

.background-cloud-right-mobile {
    position: absolute;
    top: 10%;
    right: 5%;
    z-index: 2;
    width: 20%; /* 手機版雲朵寬度 */
}

/* 底部 */
.footer-section {
    background-color: #2e3192;
    padding: 1.5rem 0;
}

.footer-content {
    text-align: center;
}

.footer-text {
    color: white;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.footer-copyright {
    color: white;
    margin: 1rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 手機版樣式 */
@media (max-width: 768px) {
    /* 標題區塊手機版 */
    .header-section {
        min-height: 10vh;
        padding: 1rem 0 0 0;
    }
    
    /* Logo手機版 */
    .header-logo {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo-img {
        width: 190px;
        height: 60px;
    }
    
    .background-tree-left,
    .background-tree-right {
        width: 30%; /* 手機版樹葉寬度 */
    }
    
    .background-cloud-left,
    .background-cloud-right {
        display: none; /* 手機版隱藏雲朵 */
    }
    
    .main-title {
        width: 80%; /* 手機版標題寬度 */
    }
    
    .event-date {
        width: 70%; /* 手機版時間寬度 */
    }
    
    /* 活動主文區塊手機版 */
    .main-content-section {
        padding: 0 0;
    }
    
    .background-grassland,
    .background-people {
        display: none; /* 手機版隱藏，移到裝飾區塊 */
    }
    
    .main-text {
        width: 100%;
        margin: 0;
        padding: 1.5rem;
    }
    
    .main-text p {
        font-size: 1rem;
    }
    
    /* 相關訊息區塊手機版 */
    .info-boxes {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    .info-box {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    
    /* 底部手機版 */
    .footer-text {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

/* 超小螢幕樣式 */
@media (max-width: 576px) {
    .main-title {
        width: 90%; /* 超小螢幕標題寬度 */
    }
    
    .event-date {
        width: 80%; /* 超小螢幕時間寬度 */
    }
    
    .info-box {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    
    .main-text {
        padding: 1rem;
    }
    
    .main-text p {
        font-size: 0.95rem;
    }
}
