/* 步驟指示器 */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step i {
    opacity: 0.5;
}

.step.active i,
.step.completed i {
    opacity: 1;
}

.step-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active .step-circle {
    background: #5CBEBC;
    border-color: #267E97;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.step.completed .step-circle {
    background: #267e97;
    border-color: #267e97;
    color: white;
}

.step-circle i {
    font-size: 2rem;
}

.step-info h3 {
    color: #333333;
    margin-bottom: 5px;
    font-size: 1.1rem;
    opacity: 0.5;
}

.step.active .step-info h3,
.step.completed .step-info h3 {
    opacity: 1;
}

.step-info p {
    color: #666666;
    font-size: 0.9rem;
}

.step-line {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.step:last-child .step-line {
    display: none;
}

.step.completed .step-line {
    background: #267e97;
}

/* 上傳區域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #5CBEBC;
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(92, 190, 188, 0.05) 0%, rgba(136, 208, 206, 0.05) 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #267E97;
    background: linear-gradient(135deg, rgba(92, 190, 188, 0.1) 0%, rgba(136, 208, 206, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.upload-area.dragover {
    border-color: #1a5a6f;
    background: rgba(38, 126, 151, 0.1);
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    color: #267E97;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-area h2 {
    color: #333333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.upload-area p {
    color: #666666;
    margin-bottom: 20px;
}

.file-hint {
    color: #D95B43;
    font-size: 0.9rem;
    margin-top: 20px;
    font-weight: 500;
}

/* 檔案預覽 */
.file-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

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

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.file-icon {
    font-size: 3rem;
    color: #D95B43;
}

.file-details { flex: 1; text-align: left; }

.file-name {
    display: block;
    font-weight: 600;
    color: #333333;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.file-size { color: #666666; font-size: 0.9rem; }

.btn-remove {
    background: #f44336;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-remove:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

/* 進度條 */
.progress-container { margin-top: 20px; }

.progress-bar {
    height: 30px;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5CBEBC 0%, #267E97 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #267E97;
    font-size: 1.1rem;
}

/* 警告訊息 */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
    position: relative;
}

.alert i { font-size: 1.5rem; }

.alert-error {
    background: #ffebee;
    color: #f44336;
    border-left: 4px solid #f44336;
}

.alert-success {
    background: #e8f5e9;
    color: #4CAF50;
    border-left: 4px solid #4CAF50;
}

.alert-close {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.alert-close:hover { opacity: 1; transform: rotate(90deg); }

/* 驗證碼區塊 */
.captcha-section {
    margin: 40px 0;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 15px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.captcha-image { position: relative; display: inline-block; }

.captcha-image img {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: block;
    height: 80px;
    width: auto;
}

.btn-refresh {
    position: absolute;
    top: -10px; right: -10px;
    background: #267E97;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-refresh:hover { background: #1a5a6f; transform: rotate(180deg); }

.captcha-input {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.captcha-input label { font-weight: 600; color: #333333; white-space: nowrap; }

.captcha-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.captcha-input input:focus {
    outline: none;
    border-color: #267E97;
    box-shadow: 0 0 0 3px rgba(38, 126, 151, 0.1);
}

.btn-audio {
    background: #88D0CE;
    color: #333333;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.btn-audio:hover {
    background: #5CBEBC;
    color: white;
    transform: scale(1.1);
}

/* 按鈕樣式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary { background: #267E97; color: white; }
.btn-primary:hover:not(:disabled) { background: #1a5a6f; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.btn-secondary { background: #666666; color: white; }
.btn-secondary:hover { background: #333333; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.btn-lg { padding: 15px 40px; font-size: 1.1rem; }

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

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* 上傳進度區域（步驟2） */
.upload-progress-section {
    text-align: center;
    padding: 60px 30px;
    animation: fadeIn 0.5s ease;
}

.upload-progress-section .upload-icon {
    color: #267E97;
    animation: spin 1.5s linear infinite;
}

.upload-progress-section h2 { color: #333333; margin: 20px 0; font-size: 1.8rem; }

.upload-progress-section .progress-container { max-width: 500px; margin: 30px auto 0; }

/* 驗證成功區域（步驟3） */
.verification-success { text-align: center; padding: 60px 30px; animation: fadeIn 0.5s ease; }

.success-icon { font-size: 5rem; color: #4CAF50; margin-bottom: 20px; animation: bounceIn 0.5s ease; }

.verification-success h2 { color: #4CAF50; font-size: 2rem; margin-bottom: 15px; }
.verification-success p { color: #333333; font-size: 1.2rem; margin-bottom: 30px; }

/* 驗證失敗區域 */
.verification-failed { text-align: center; padding: 60px 30px; animation: fadeIn 0.5s ease; }

.error-icon { font-size: 5rem; color: #f44336; margin-bottom: 20px; animation: shake 0.5s ease; }

.verification-failed h2 { color: #f44336; font-size: 2rem; margin-bottom: 15px; }
.verification-failed p { color: #333333; font-size: 1.2rem; margin-bottom: 30px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounceIn { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 載入遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.loading-spinner i {
    font-size: 3rem;
    color: #267E97;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: #333333;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    /* 手機版步驟指示器 - 垂直排列 */
    .steps-indicator {
        flex-direction: column;
        gap: 0;
        padding-left: 20px;
        position: relative;
    }
    
    .step {
        display: flex;
        align-items: center;
        text-align: left;
        margin-bottom: 30px;
        position: relative;
    }
    
    .step:last-child {
        margin-bottom: 0;
    }
    
    /* 垂直進度線 */
    .step-line {
        position: absolute;
        top: 60px;
        left: 30px;
        width: 3px;
        height: 60px;
        background: #e0e0e0;
        z-index: 1;
    }
    
    .step:last-child .step-line {
        display: none;
    }
    
    .step.completed .step-line {
        background: #267e97;
    }
    
    /* 圓圈保持在左邊 */
    .step-circle {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        margin: 0;
        margin-right: 20px;
    }
    
    .step-circle i {
        font-size: 1.5rem;
    }
    
    /* 文字在圓圈右邊 */
    .step-info {
        flex: 1;
        padding-right: 10px;
    }
    
    .step-info h3 {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .step-info small {
        font-size: 0.8rem;
        color: #666666;
        display: block;
        line-height: 1.3;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-area h2 {
        font-size: 1.5rem;
    }
    
    .captcha-container {
        flex-direction: column;
    }
    
    .captcha-input {
        flex-direction: column;
        min-width: 100%;
        text-align: center;
    }
    
    .captcha-input input {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .result-icon {
        font-size: 4rem;
    }
    
    .result-card {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    /* 更小螢幕的步驟指示器調整 */
    .steps-indicator {
        padding-left: 10px;
    }
    
    .step {
        margin-bottom: 25px;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .step-circle i {
        font-size: 1.2rem;
    }
    
    .step-line {
        top: 50px;
        left: 23px;
        height: 55px;
    }
    
    .step-info h3 {
        font-size: 0.9rem;
    }
    
    .step-info small {
        font-size: 0.75rem;
    }
    
    .upload-area h2 {
        font-size: 1.2rem;
    }
    
    .upload-area p {
        font-size: 0.9rem;
    }
    
    .file-icon {
        font-size: 2.5rem;
    }
    
    .file-name {
        font-size: 1rem;
    }
    
    .result-card h2 {
        font-size: 1.5rem;
    }
    
    .result-details {
        padding: 15px;
    }
}
