/* 全局樣式 */
body {
    background-color: #f8f9fa;
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
    color: #333;
}

.container {
    max-width: 900px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 1.5rem;
}

.card-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 2rem;
}

/* 區段樣式 */
.section {
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
    border: none;
}

.section-title {
    display: none;
}

/* 表單樣式 */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* 必填欄位標記 */
.text-danger {
    color: #dc3545 !important;
}

/* 按鈕樣式 */
.btn-primary {
    background: #3A4D39 !important;
    border: none;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.75rem 0;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3A4D39 0%, #4d5e4c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

/* 媒體預覽樣式 */
.preview-item {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
}

.preview-item:hover {
    background-color: #e9ecef;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.preview-item .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.preview-item .remove-btn:hover {
    background-color: #dc3545;
    transform: scale(1.1);
}

.preview-item .file-info {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* 表單驗證樣式 */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 響應式調整 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .preview-item {
        margin-bottom: 0.5rem;
    }
}

/* 載入動畫 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid #f3f3f3;
    border-top: 0.25rem solid #3A4D39;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-img-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.header-img {
    width: 100%;
    max-width: 500px;
    border-radius: 10px 10px 10px 10px;
    object-fit: cover;
}

.form-title {
    display: none;
}

.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

@media (max-width: 600px) {
    .header-img, .form-card {
        max-width: 100%;
        padding: 1rem;
    }
    .form-card {
        padding: 1rem 0.5rem;
    }
} 