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

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #9333EA 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* 移除背景圖片相關樣式，body 已經有漸層背景 */

/* 提交影片容器 */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none; /* 預設隱藏 */
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.submit-video {
    width: 80%;
    max-width: 800px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 錯誤頁面樣式 */
.error-page {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-page h1 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.error-page p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 許願表單樣式 */
.wish-form-page {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
}

.wish-header {
    text-align: center;
    margin-bottom: 30px;
}

.wish-header h1 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 2rem;
}

.wish-header p {
    color: #718096;
    font-size: 1.1rem;
}

.wish-form {
    width: 100%;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input[type="tel"] {
    letter-spacing: 1px;
}

.char-count {
    text-align: right;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #718096;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

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

/* 動畫容器 */
.animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.animation-fallback {
    display: none;
}

.stars-animation {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.star {
    position: absolute;
    font-size: 2rem;
    animation: twinkle 2s infinite;
}

.star:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.star:nth-child(2) {
    top: 20%;
    right: 20%;
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

.star:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

/* 成功訊息 */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.success-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: bounceIn 0.6s ease-out;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-content h2 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.success-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.wish-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

/* 願望展示頁面 */
.wish-display-page {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
    position: relative;
}

.wish-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    position: relative;
}

.wish-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.wish-content h3 {
    color: #495057;
    margin-bottom: 10px;
}

.wish-text {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

/* 分享區域 */
.share-section {
    text-align: center;
    margin-top: 30px;
}

.share-section h3 {
    color: #495057;
    margin-bottom: 10px;
}

.share-section p {
    color: #6c757d;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.copy {
    background: #6c757d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 浮動元素 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-star {
    position: absolute;
    font-size: 1.5rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.floating-star:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-star:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.floating-star:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.floating-star:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-delay: 1s;
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(120deg);
    }
    66% {
        transform: translateY(5px) rotate(240deg);
    }
}

.pulse {
    width: 60px;
    height: 60px;
    background: #e74c3c;
    border-radius: 50%;
    margin: 20px auto;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 自訂提示框樣式 */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.alert-content {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 400px;
    margin: 20px;
    animation: alertSlideIn 0.3s ease-out;
    border: 1px solid #e2e8f0;
}

.alert-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.alert-icon.warning {
    color: #f59e0b;
}

.alert-icon.error {
    color: #ef4444;
}

.alert-icon.success {
    color: #10b981;
}

.alert-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.alert-message {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 25px;
}

.alert-button {
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #9333EA 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.alert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.alert-button:active {
    transform: translateY(0);
}

@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .wish-form-page,
    .wish-display-page,
    .error-page {
        padding: 20px;
    }
    
    .wish-header h1 {
        font-size: 1.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
    }
}