* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* 登入頁面樣式 */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(120, 119, 198, 0.15),
        0 8px 32px rgba(120, 119, 198, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    animation: loginSlideIn 0.6s ease;
}

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

.login-header {
    background: linear-gradient(135deg, #6a5acd 0%, #483d8b 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.9) 0%, rgba(72, 61, 139, 0.9) 100%);
    z-index: 1;
}

.login-header h1,
.login-header .login-subtitle {
    position: relative;
    z-index: 2;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.login-subtitle {
    font-size: 1rem;
    opacity: 1;
    font-weight: 400;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #ecf0f1;
}

.login-form {
    padding: 40px 30px;
}

/* 登入模式切換 */
.login-mode-toggle {
    display: flex;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(120, 119, 198, 0.15);
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mode-btn:hover:not(.active) {
    background: #e9ecef;
}

/* 雲端登入欄位 */
#cloudLoginFields {
    margin-bottom: 15px;
}

#cloudLoginFields .input-group {
    margin-bottom: 15px;
}

#cloudLoginFields input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e4ef;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#cloudLoginFields input:focus {
    outline: none;
    border-color: #8a7bc8;
    box-shadow: 0 0 0 3px rgba(138, 123, 200, 0.1);
}

/* 註冊按鈕 */
.register-btn {
    width: 100%;
    padding: 12px 24px;
    margin-top: 15px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.register-btn:hover {
    background: linear-gradient(135deg, #00a085, #00b7b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* 註冊對話框樣式 */
.register-group {
    margin-bottom: 20px;
}

.register-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a4a4a;
    font-weight: 600;
    font-size: 14px;
}

.register-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.register-info p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

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

.password-input-group input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.password-input-group input:focus {
    border-color: #8a7bc8;
    box-shadow: 0 0 0 3px rgba(138, 123, 200, 0.15);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8a7bc8 0%, #6a5acd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(138, 123, 200, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 123, 200, 0.4);
    background: linear-gradient(135deg, #8a7bc8 0%, #5d4e9a 100%);
}

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

.login-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-attempts {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.login-attempts.warning {
    color: #dc3545;
    font-weight: 600;
}

.login-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.login-footer p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #6c757d;
}

.change-password-btn {
    padding: 8px 16px;
    background: rgba(138, 123, 200, 0.1);
    color: #8a7bc8;
    border: 2px solid #8a7bc8;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.change-password-btn:hover {
    background: #8a7bc8;
    color: white;
    transform: translateY(-1px);
}

/* 彈出式對話框樣式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #8a7bc8 0%, #6a5acd 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.password-group {
    margin-bottom: 20px;
}

.password-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cancel-btn, .confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.confirm-btn {
    background: linear-gradient(135deg, #8a7bc8 0%, #6a5acd 100%);
    color: white;
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #7a6bb8 0%, #5a4abd 100%);
    transform: translateY(-1px);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(120, 119, 198, 0.1),
        0 8px 32px rgba(120, 119, 198, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    overflow: hidden;
    margin-top: 20px;
}

header {
    background: linear-gradient(135deg, #6a5acd 0%, #483d8b 100%);
    color: white;
    padding: 30px;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.9) 0%, rgba(72, 61, 139, 0.9) 100%);
    z-index: 1;
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-content h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.subtitle {
    font-size: 1rem;
    opacity: 1;
    font-weight: 400;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #ecf0f1;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(236, 240, 241, 0.15);
    color: #ecf0f1;
    border: 2px solid rgba(236, 240, 241, 0.3);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.logout-btn:hover {
    background: rgba(236, 240, 241, 0.25);
    border-color: rgba(236, 240, 241, 0.5);
    transform: translateY(-1px);
}

.add-task-section {
    padding: 25px;
    background: rgba(248, 249, 250, 0.6);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#quadrantSelect {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    background: white;
    min-width: 150px;
}

#quadrantSelect:focus {
    border-color: #8a7bc8;
    box-shadow: 0 0 0 3px rgba(138, 123, 200, 0.15);
}

#taskInput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#taskInput:focus {
    border-color: #8a7bc8;
    box-shadow: 0 0 0 3px rgba(138, 123, 200, 0.15);
}

#addTaskBtn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #8a7bc8 0%, #6a5acd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(138, 123, 200, 0.3);
}

#addTaskBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 123, 200, 0.4);
    background: linear-gradient(135deg, #8a7bc8 0%, #5d4e9a 100%);
}

#addTaskBtn:active {
    transform: translateY(0);
}

.stats-section {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: rgba(248, 249, 250, 0.6);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #6a5acd;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.filter-section {
    display: flex;
    padding: 20px;
    gap: 10px;
    background: rgba(248, 249, 250, 0.6);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #8a7bc8;
    color: #6a5acd;
}

.filter-btn.active {
    background: #8a7bc8;
    color: white;
    border-color: #8a7bc8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(138, 123, 200, 0.3);
}

.file-operations {
    padding: 20px;
    background: rgba(248, 249, 250, 0.6);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
    text-align: center;
}

.file-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

.file-btn {
    padding: 10px 20px;
    border: 2px solid #6c757d;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.export-btn:hover {
    border-color: #28a745;
    color: #28a745;
    background: #f8fff9;
}

.import-btn:hover {
    border-color: #17a2b8;
    color: #17a2b8;
    background: #f8fdff;
}

.file-info {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.tasks-section {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

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

.empty-state p {
    font-size: 1.1rem;
}

.task-list {
    list-style: none;
    padding: 0;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    animation: slideIn 0.3s ease;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-item.completed {
    opacity: 0.7;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #6c757d;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #8a7bc8;
}

.task-content {
    flex: 1;
    margin-right: 15px;
}

.task-text {
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 2px;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.delete-btn {
    padding: 8px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.delete-btn:hover {
    background: #c82333;
}

.task-date {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.hidden {
    display: none !important;
}

/* 確保主容器初始隱藏 */
#mainContainer.hidden {
    display: none;
}

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

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

.task-item.removing {
    animation: fadeOut 0.3s ease forwards;
}

/* 響應式設計 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #addTaskBtn {
        width: 100%;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-section {
        flex-wrap: wrap;
    }
    
    .file-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .file-btn {
        width: 200px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .login-box {
        margin: 10px;
    }
    
    .login-header {
        padding: 30px 20px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
}

/* 艾森豪矩陣四象限區塊 */
.matrix-section {
    padding: 30px 0 10px 0;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    min-height: 480px;
}

.quadrant {
    background: rgba(245, 247, 250, 0.85);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(120, 119, 198, 0.08);
    border: 2.5px solid #e0e4ef;
    padding: 18px 12px 12px 12px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.quadrant.drag-over {
    border-color: #8a7bc8;
    box-shadow: 0 0 0 4px rgba(138, 123, 200, 0.12);
}

.quadrant-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 4px 0 4px 6px;
    border-radius: 8px;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.12);
}
.quadrant-title.q1 { background: linear-gradient(90deg, #e17055 60%, #fdcb6e 100%); }
.quadrant-title.q2 { background: linear-gradient(90deg, #00b894 60%, #00cec9 100%); }
.quadrant-title.q3 { background: linear-gradient(90deg, #0984e3 60%, #6c5ce7 100%); }
.quadrant-title.q4 { background: linear-gradient(90deg, #636e72 60%, #b2bec3 100%); }

.task-list {
    flex: 1;
    min-height: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 14px 10px;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(120, 119, 198, 0.06);
    border: 1.5px solid #e0e4ef;
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
    cursor: grab;
    user-select: none;
    position: relative;
}

.task-item.dragging {
    opacity: 0.5;
    background: #eaeaff;
    border-color: #8a7bc8;
    z-index: 10;
}

.task-item.completed {
    opacity: 0.7;
    background: #f1f2f6;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #6c757d;
}

.task-item .task-checkbox {
    margin-right: 12px;
}

.empty-hint {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.5);
}

.task-actions {
    display: flex;
    gap: 8px;
}

.delete-btn {
    padding: 6px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.delete-btn:hover {
    background: #c82333;
}

@media (max-width: 900px) {
    .matrix-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 18px;
    }
    .quadrant {
        min-height: 120px;
    }
}

/* Google Sheets 同步區域樣式 */
.sheets-sync-section {
    background: rgba(245, 247, 250, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(120, 119, 198, 0.08);
    border: 2px solid rgba(120, 119, 198, 0.1);
    position: relative;
    overflow: hidden;
}

.sheets-sync-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 123, 200, 0.02) 0%, rgba(181, 151, 225, 0.02) 100%);
    z-index: 0;
}

.sheets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.sheets-header h3 {
    color: #4a4a4a;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.sheets-status-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sync-status-light {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(106, 90, 205, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: help;
}

.sync-status-light:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(106, 90, 205, 0.4);
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 100%);
    transition: all 0.4s ease;
}

/* 不同狀態的燈號顏色和動畫 */
.status-indicator.gray {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    animation: none;
}

.status-indicator.red {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.yellow {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    animation: statusSpin 1.5s linear infinite;
}

.status-indicator.green {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    animation: statusGlow 3s ease-in-out infinite;
}

/* 狀態燈號動畫效果 */
@keyframes statusPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(0.95);
    }
}

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

@keyframes statusGlow {
    0%, 100% { 
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            0 0 0 rgba(46, 204, 113, 0);
    }
    50% { 
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(46, 204, 113, 0.6);
    }
}

.sheets-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sheets-status.connected {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sheets-status.disconnected {
    background: linear-gradient(135deg, #e17055, #fdcb6e);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sheets-status.initializing {
    background: linear-gradient(135deg, #636e72, #b2bec3);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sheets-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.sheets-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(120, 119, 198, 0.15);
    position: relative;
    overflow: hidden;
}

.sheets-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;
}

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

.auth-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5f3dc4, #9c88ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.sync-btn {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sync-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00a085, #00b7b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3);
}

.auto-btn {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auto-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fd6584, #e4a951);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 121, 168, 0.3);
}

.auto-btn.active {
    background: linear-gradient(135deg, #e84393, #ff7675);
}

.sheets-btn:disabled {
    background: #ddd !important;
    color: #999 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
}

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

.sheets-info {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* 響應式設計 - Google Sheets 區域 */
@media (max-width: 768px) {
    .sheets-sync-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .sheets-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .sheets-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .sheets-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .sheets-status-container {
        justify-content: center;
        text-align: center;
    }
    
    .sync-status-light {
        min-width: 28px;
        height: 28px;
    }
    
    .status-indicator {
        width: 14px;
        height: 14px;
    }
    
    .status-indicator::before {
        top: 1px;
        left: 1px;
        width: 12px;
        height: 12px;
    }
} 