* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* 登入頁面樣式 */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-card h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.google-btn:active {
    transform: translateY(1px);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Email 登入表單樣式 */
.auth-mode h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.primary-btn {
    width: 100%;
    padding: 14px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.primary-btn:hover {
    background: #5568d3;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.primary-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.secondary-btn {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #f8f9fa;
}

.text-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #667eea;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    margin-bottom: 10px;
}

.text-btn:hover {
    color: #5568d3;
}

/* 註冊提示區塊 */
.signup-prompt {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.link-btn {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    margin-left: 5px;
}

.link-btn:hover {
    color: #5568d3;
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.google-login-section {
    text-align: center;
    margin-bottom: 20px;
}

/* 主頁樣式 */
.home-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    color: #333;
    font-size: 28px;
}

.logout-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 用戶資訊 */
.user-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.user-details {
    flex: 1;
}

.user-details h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 5px;
}

.user-details p {
    color: #666;
    font-size: 14px;
    margin-bottom: 3px;
}

.user-id {
    font-size: 12px !important;
    color: #999 !important;
    font-family: monospace;
}

/* Email 驗證警告 */
.verification-alert {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 30px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon {
    font-size: 32px;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    color: #856404;
    font-size: 16px;
    margin-bottom: 8px;
}

.alert-message {
    color: #856404;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.resend-btn {
    padding: 10px 20px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover {
    background: #ffca2c;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.resend-btn:disabled {
    background: #d4d4d4;
    cursor: not-allowed;
}

/* 資訊區塊 */
.info-section {
    margin-bottom: 30px;
}

.info-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item label {
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.info-item span {
    color: #333;
    font-size: 14px;
}

/* 操作按鈕 */
.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #5568d3;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 載入動畫 */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    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); }
}

/* 錯誤訊息 */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 15px;
    min-height: 20px;
}

/* 響應式設計 */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
    }
    
    .login-card,
    .home-card,
    .settings-card {
        padding: 30px 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .actions {
        flex-direction: column;
    }
}

/* ========== 設定頁面樣式 ========== */

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.back-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.settings-form {
    margin-top: 20px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    color: #333;
    font-size: 14px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.save-btn {
    flex: 1;
    padding: 14px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #218838;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.info-box {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

.info-box h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.info-box li {
    margin-bottom: 5px;
}

/* 訊息提示 */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 按鈕連結樣式 */
.settings-btn {
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
}

/* ========== 自選股功能樣式 ========== */

/* 會員中心統計區域 */
.stats-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.stat-card .stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 13px;
    opacity: 0.9;
}

/* 自選股容器 */
.watchlist-container {
    width: 100%;
    max-width: 1200px;
}

.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 自選股卡片 */
.watchlist-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.watchlist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.watchlist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-color, #3b82f6);
}

.watchlist-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.watchlist-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.watchlist-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.watchlist-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.watchlist-stats {
    display: flex;
    gap: 15px;
}

.watchlist-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-menu {
    position: relative;
}

.btn-menu {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-menu:hover {
    background: #f0f0f0;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}

/* 群組詳細頁 */
.watchlist-detail-container {
    width: 100%;
    max-width: 1000px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    gap: 10px;
}

.watchlist-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.watchlist-color-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-header h1 {
    color: white;
    font-size: 32px;
    margin: 0;
}

.page-header .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* 股票列表 */
.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.stock-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stock-info {
    flex: 1;
}

.stock-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.stock-name {
    font-size: 14px;
    color: #666;
}

.stock-card-body {
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.stock-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #e3f2fd;
    color: #1976d2;
}

.badge-secondary {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-info {
    background: #e8f5e9;
    color: #388e3c;
}

.stock-note {
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
    line-height: 1.5;
}

.stock-added-time {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Modal 樣式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 25px;
}

.modal-header h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.modal-body {
    margin-bottom: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.color-picker-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.color-picker-group input[type="text"] {
    flex: 1;
}

/* 搜尋結果 */
.search-results {
    display: none;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item.no-results {
    cursor: default;
    color: #999;
    text-align: center;
}

.search-result-item.no-results:hover {
    background: white;
}

.search-result-symbol {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.search-result-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 2px;
}

.search-result-industry {
    font-size: 12px;
    color: #999;
}

/* Toast 通知 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    color: #155724;
    border-left: 4px solid #28a745;
}

.toast-error {
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* 按鈕圖標樣式 */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-delete {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    color: #666;
}

.btn-delete:hover {
    background: #fee;
    color: #dc3545;
}

/* 載入中 */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    font-size: 14px;
    opacity: 0.9;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .watchlist-grid,
    .stocks-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
    }
    
    .header-right {
        width: 100%;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .action-bar .btn {
        width: 100%;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .stock-symbol {
        font-size: 18px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
}

/* ========== 跑馬燈樣式 ========== */

.marquee-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

.marquee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marquee-high-priority {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.marquee-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marquee-content a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.marquee-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 20s linear infinite;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.marquee-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.marquee-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.marquee-close:active {
    transform: scale(0.95);
}

/* 當有跑馬燈時，body 需要增加上方間距 */
body.has-marquee {
    padding-top: 48px;
}

@media (max-width: 768px) {
    .marquee {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .marquee-icon {
        font-size: 14px;
    }
    
    .marquee-close {
        width: 24px;
        height: 24px;
        font-size: 16px;
        margin-left: 10px;
    }
}
