/**
 * PerfectCorp Skin Analysis v4 - Interface Styles
 * 包含圓形進度條和完整介面樣式
 * 
 * @package PerfectCorp_Skin_Analysis_V4
 * @since 4.0.0
 */

/* ==========================================================================
   基礎樣式重置
   ========================================================================== */

.pcs4-wrapper * {
    box-sizing: border-box;
}

.pcs4-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f7fafc;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   標題區域
   ========================================================================== */

.pcs4-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.pcs4-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    pointer-events: none;
}

.pcs4-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.pcs4-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   主容器
   ========================================================================== */

.pcs4-container {
    background: white;
    position: relative;
    min-height: 600px;
}

/* ==========================================================================
   相機區域
   ========================================================================== */

.pcs4-camera-section {
    padding: 40px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    position: relative;
}

.pcs4-camera-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(102, 126, 234, 0.3);
}

.pcs4-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 17px;
}

/* 輔助線樣式 */
.pcs4-guidelines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.pcs4-guidelines-svg {
    width: 100%;
    height: 100%;
}

.pcs4-guidelines-svg ellipse {
    animation: pulse-guideline 2s ease-in-out infinite;
}

@keyframes pulse-guideline {
    0%, 100% { 
        opacity: 0.6;
        stroke-width: 2;
    }
    50% { 
        opacity: 0.9;
        stroke-width: 2.5;
    }
}

/* Canvas 樣式 */
.pcs4-canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

/* ==========================================================================
   控制按鈕區域
   ========================================================================== */

.pcs4-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid #dee2e6;
}

.pcs4-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pcs4-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.pcs4-btn:hover::before {
    left: 100%;
}

.pcs4-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pcs4-btn:disabled::before {
    display: none;
}

/* 主要按鈕 */
.pcs4-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pcs4-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.pcs4-btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

/* 次要按鈕 */
.pcs4-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.pcs4-btn-secondary:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 第三按鈕 */
.pcs4-btn-tertiary {
    background: #e2e8f0;
    color: #718096;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.1);
}

.pcs4-btn-tertiary:hover:not(:disabled) {
    background: #cbd5e0;
    color: #4a5568;
    transform: translateY(-2px);
}

.pcs4-btn-icon {
    font-size: 1.2rem;
}

.pcs4-btn-text {
    font-weight: 600;
}

/* ==========================================================================
   結果顯示區域
   ========================================================================== */

.pcs4-results {
    padding: 40px;
    background: white;
    min-height: 400px;
}

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

.pcs4-results-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    letter-spacing: -0.5px;
}

.pcs4-results-content {
    min-height: 300px;
}

/* ==========================================================================
   分析結果樣式
   ========================================================================== */

.pcs4-analysis-results {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 肌膚類型顯示 */
.pcs4-skin-type {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fc 0%, #e6f3ff 100%);
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.pcs4-skin-type-label {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 500;
    margin-bottom: 10px;
}

.pcs4-skin-type-value {
    font-size: 2rem;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 不同肌膚類型的顏色 */
.pcs4-skin-type-sensitive {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.pcs4-skin-type-oily {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
}

.pcs4-skin-type-dry {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
}

.pcs4-skin-type-combination {
    background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
}

.pcs4-skin-type-normal {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
}

/* ==========================================================================
   圓形進度指示器
   ========================================================================== */

.pcs4-circles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 25px;
    justify-items: center;
    padding: 20px;
}

.pcs4-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.pcs4-circle-item:hover {
    transform: translateY(-5px);
}

.pcs4-circle-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.pcs4-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.pcs4-progress-circle {
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
}

.pcs4-circle-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pcs4-circle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    line-height: 1.3;
    max-width: 80px;
    word-wrap: break-word;
}

/* ==========================================================================
   空狀態和訊息
   ========================================================================== */

.pcs4-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #a0aec0;
}

.pcs4-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.pcs4-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 10px;
}

.pcs4-empty-subtitle {
    font-size: 1rem;
    color: #a0aec0;
    max-width: 300px;
}

/* ==========================================================================
   載入和錯誤狀態
   ========================================================================== */

.pcs4-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.pcs4-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pcs4-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.pcs4-loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4a5568;
}

/* 錯誤狀態 */
.pcs4-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    background: #fed7d7;
    border: 2px solid #fc8181;
    border-radius: 15px;
    color: #742a2a;
    margin: 20px;
}

.pcs4-error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.pcs4-error-message {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

/* 成功狀態 */
.pcs4-success {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #c6f6d5;
    border: 2px solid #68d391;
    border-radius: 10px;
    color: #22543d;
    margin-bottom: 15px;
}

.pcs4-success-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* ==========================================================================
   訊息系統
   ========================================================================== */

.pcs4-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.pcs4-message {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    min-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pcs4-message-success {
    background: #c6f6d5;
    border-left: 5px solid #38a169;
    color: #22543d;
}

.pcs4-message-error {
    background: #fed7d7;
    border-left: 5px solid #e53e3e;
    color: #742a2a;
}

.pcs4-message-warning {
    background: #faf089;
    border-left: 5px solid #d69e2e;
    color: #744210;
}

.pcs4-message-info {
    background: #bee3f8;
    border-left: 5px solid #3182ce;
    color: #2a4365;
}

.pcs4-message-icon {
    font-size: 1.2rem;
    margin-right: 12px;
}

.pcs4-message-text {
    flex: 1;
    font-weight: 500;
}

.pcs4-message-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pcs4-message-close:hover {
    opacity: 1;
}

/* ==========================================================================
   結果操作區域
   ========================================================================== */

.pcs4-results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px 20px;
    border-top: 2px solid #e2e8f0;
    margin-top: 30px;
}

/* ==========================================================================
   權限錯誤
   ========================================================================== */

.pcs4-permission-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #fc8181;
    border-radius: 15px;
    margin: 20px;
}

.pcs4-error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #742a2a;
    margin: 15px 0 10px 0;
}

.pcs4-error-action {
    margin-top: 25px;
}

.pcs4-login-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.pcs4-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

/* ==========================================================================
   響應式設計
   ========================================================================== */

/* 平板 */
@media (max-width: 992px) {
    .pcs4-title {
        font-size: 1.8rem;
    }
    
    .pcs4-camera-section {
        padding: 30px 20px;
    }
    
    .pcs4-controls {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .pcs4-circles-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 20px;
    }
}

/* 手機 */
@media (max-width: 768px) {
    .pcs4-wrapper {
        margin: 0;
        border-radius: 0;
    }
    
    .pcs4-header {
        padding: 25px 20px;
    }
    
    .pcs4-title {
        font-size: 1.6rem;
    }
    
    .pcs4-subtitle {
        font-size: 1rem;
    }
    
    .pcs4-camera-section {
        padding: 20px 15px;
        min-height: 350px;
    }
    
    .pcs4-camera-container {
        border-radius: 15px;
        border-width: 2px;
    }
    
    .pcs4-controls {
        flex-direction: column;
        align-items: center;
        padding: 25px 20px;
    }
    
    .pcs4-btn {
        width: 100%;
        max-width: 280px;
        padding: 18px 30px;
        font-size: 18px;
    }
    
    .pcs4-results {
        padding: 25px 20px;
    }
    
    .pcs4-results-header h3 {
        font-size: 1.6rem;
    }
    
    .pcs4-circles-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .pcs4-circle-container {
        width: 70px;
        height: 70px;
    }
    
    .pcs4-circle-score {
        font-size: 1rem;
    }
    
    .pcs4-circle-label {
        font-size: 0.8rem;
        max-width: 70px;
    }
    
    .pcs4-skin-type {
        padding: 20px 15px;
    }
    
    .pcs4-skin-type-value {
        font-size: 1.6rem;
        padding: 12px 24px;
    }
    
    .pcs4-messages {
        left: 15px;
        right: 15px;
        max-width: none;
    }
    
    .pcs4-message {
        min-width: auto;
    }
}

/* 小螢幕手機 */
@media (max-width: 480px) {
    .pcs4-circles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pcs4-circle-container {
        width: 60px;
        height: 60px;
    }
    
    .pcs4-circle-score {
        font-size: 0.9rem;
    }
    
    .pcs4-circle-label {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   深色主題支援
   ========================================================================== */

.pcs4-wrapper[data-theme="dark"] {
    background: #1a202c;
    color: #e2e8f0;
}

.pcs4-wrapper[data-theme="dark"] .pcs4-container {
    background: #2d3748;
}

.pcs4-wrapper[data-theme="dark"] .pcs4-results {
    background: #2d3748;
}

.pcs4-wrapper[data-theme="dark"] .pcs4-results-header h3 {
    color: #e2e8f0;
}

.pcs4-wrapper[data-theme="dark"] .pcs4-circle-score {
    color: #e2e8f0;
}

.pcs4-wrapper[data-theme="dark"] .pcs4-circle-label {
    color: #cbd5e0;
}

/* ==========================================================================
   APP 內瀏覽器警告
   ========================================================================== */

.pcs4-app-browser-warning {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    margin: 20px;
    color: #856404;
}

.pcs4-warning-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.pcs4-warning-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #856404;
    margin-bottom: 15px;
}

.pcs4-warning-message {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pcs4-warning-message p {
    margin-bottom: 10px;
}

.pcs4-warning-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pcs4-warning-help {
    margin-top: 25px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pcs4-warning-help details {
    background: rgba(255, 255, 255, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(133, 100, 4, 0.2);
}

.pcs4-warning-help summary {
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    color: #856404;
    font-size: 1.1rem;
}

.pcs4-warning-help summary:hover {
    color: #533f03;
}

.pcs4-help-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(133, 100, 4, 0.2);
}

.pcs4-help-content h4 {
    color: #856404;
    font-size: 1.1rem;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.pcs4-help-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pcs4-help-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ==========================================================================
   列印樣式
   ========================================================================== */

@media print {
    .pcs4-wrapper {
        box-shadow: none;
        background: white;
    }
    
    .pcs4-camera-section,
    .pcs4-controls,
    .pcs4-messages,
    .pcs4-loading-overlay,
    .pcs4-app-browser-warning {
        display: none !important;
    }
    
    .pcs4-results {
        padding: 20px 0;
    }
    
    .pcs4-circles-grid {
        break-inside: avoid;
    }
}

/* ==========================================================================
   APP 內瀏覽器警告響應式
   ========================================================================== */

@media (max-width: 768px) {
    .pcs4-app-browser-warning {
        margin: 15px;
        padding: 30px 20px;
    }
    
    .pcs4-warning-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .pcs4-warning-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .pcs4-warning-message {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .pcs4-warning-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .pcs4-warning-actions .pcs4-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .pcs4-help-content h4 {
        font-size: 1rem;
    }
    
    .pcs4-help-content li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pcs4-app-browser-warning {
        margin: 10px;
        padding: 25px 15px;
    }
    
    .pcs4-warning-icon {
        font-size: 2.5rem;
    }
    
    .pcs4-warning-title {
        font-size: 1.3rem;
    }
    
    .pcs4-warning-message {
        font-size: 0.95rem;
    }
    
    .pcs4-warning-help details {
        padding: 12px;
    }
    
    .pcs4-help-content h4 {
        font-size: 0.95rem;
    }
    
    .pcs4-help-content li {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
}

/* 增強跳轉中介面樣式 */
.pcs4-redirecting {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin: 20px;
    animation: redirectingPulse 2s ease-in-out infinite;
}

@keyframes redirectingPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5); }
}

.pcs4-redirecting-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: redirectingRocket 1.5s ease-in-out infinite;
}

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

.pcs4-redirecting-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pcs4-redirecting-message {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.6;
}

.pcs4-redirecting-message p {
    margin: 8px 0;
}

/* 增強載入點動畫 */
.pcs4-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pcs4-loading-dots span {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: redirectingDots 1.4s ease-in-out infinite both;
}

.pcs4-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.pcs4-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.pcs4-loading-dots span:nth-child(3) { animation-delay: 0; }

@keyframes redirectingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* 響應式跳轉介面 */
@media (max-width: 768px) {
    .pcs4-redirecting {
        margin: 10px;
        padding: 30px 15px;
    }
    
    .pcs4-redirecting-icon {
        font-size: 3rem;
    }
    
    .pcs4-redirecting-title {
        font-size: 1.4rem;
    }
    
    .pcs4-redirecting-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pcs4-redirecting-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .pcs4-redirecting-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .pcs4-redirecting-message {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .pcs4-loading-dots span {
        width: 10px;
        height: 10px;
    }
}

/* 增強 APP 瀏覽器警告動畫 */
.pcs4-app-browser-warning {
    animation: warningSlideIn 0.5s ease-out;
}

@keyframes warningSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.pcs4-warning-icon {
    animation: warningBounce 2s ease-in-out infinite;
}

@keyframes warningBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}