/* Layout.cshtml Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
    padding: 15px 0;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

    .page-header h1 {
        font-family: 'Poppins', 'Noto Sans TC', sans-serif;
        font-weight: 700;
        font-size: 3rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 10px;
    }

    .page-header .subtitle {
        font-size: 1.1rem;
        color: #4a5568;
        font-weight: 500;
    }


.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease;
}

    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

.card-title {
    font-family: 'Poppins', 'Noto Sans TC', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .card-title i {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.card-description {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 20px;
    font-style: italic;
}

.form-input {
    padding: 10px 12px;
    border: 2px solid #48bb78;
    border-radius: 12px !important;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
}
/* ========== 按鈕 ========== */
.btn-custom {
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-custom:hover {
        background: #f7fafc;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.btn-custom-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-custom-outline:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

.btn-sponsor {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

    .btn-sponsor:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    }
/* Seo Section */

.seo-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .seo-section h2 {
        font-family: 'Poppins', 'Noto Sans TC', sans-serif;
        font-size: 2rem;
        font-weight: 700;
        color: #2d3748;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 3px solid #667eea;
    }

    .seo-section h3 {
        font-family: 'Poppins', 'Noto Sans TC', sans-serif;
        font-size: 1.5rem;
        font-weight: 600;
        color: #4a5568;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .seo-section h4 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #667eea;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .seo-section p {
        font-size: 1rem;
        line-height: 1.8;
        color: #4a5568;
        margin-bottom: 15px;
    }

    .seo-section ul,
    .seo-section ol {
        margin-left: 25px;
        margin-bottom: 20px;
    }

    .seo-section li {
        font-size: 1rem;
        line-height: 1.8;
        color: #4a5568;
        margin-bottom: 10px;
    }

    .seo-section strong {
        color: #667eea;
        font-weight: 600;
    }

    .seo-section a {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

        .seo-section a:hover {
            color: #764ba2;
            text-decoration: underline;
        }

/* Language Button */
.language-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

    .language-button:hover {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
    }

/* Language Dropdown */
.language-dropdown {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 999;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    padding: 15px;
    animation: fadeInUp 0.3s ease;
}

    .language-dropdown.active {
        display: block;
    }

    .language-dropdown h6 {
        font-size: 0.85rem;
        color: #6b7280;
        margin-bottom: 10px;
        padding-left: 10px;
    }

    .language-dropdown .lang-item {
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }

        .language-dropdown .lang-item:hover {
            background: #f3f4f6;
        }

        .language-dropdown .lang-item i {
            width: 20px;
        }

        .language-dropdown .lang-item small {
            display: block;
            color: #9ca3af;
            margin-left: 30px;
        }

    .language-dropdown .divider {
        height: 1px;
        background: #e5e7eb;
        margin: 10px 0;
    }

/* Actions Menu Button (Expandable) */
.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.actions-menu-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 1000;
}

.actions-menu-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    animation: pulse-actions 2s infinite;
}

    .actions-menu-button:hover {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
    }

    .actions-menu-button.active {
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        transform: rotate(45deg);
    }

@keyframes pulse-actions {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(139, 92, 246, 0.7);
    }
}

/* Actions Menu Items (Hidden by default) */
.actions-menu-items {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

    .actions-menu-items.active {
        opacity: 1;
        pointer-events: auto;
    }

.action-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
}

.actions-menu-items.active .action-item:nth-child(1) {
    animation-delay: 0.05s;
}

.actions-menu-items.active .action-item:nth-child(2) {
    animation-delay: 0.1s;
}

.actions-menu-items.active .action-item:nth-child(3) {
    animation-delay: 0.15s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.action-item-label {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.action-item-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

    .action-item-button:hover {
        transform: scale(1.15);
    }

/* Individual action button colors */
.action-sponsor {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

    .action-sponsor:hover {
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    }

.action-favorite {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

    .action-favorite.active {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    .action-favorite:hover {
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
    }

    .action-favorite.active:hover {
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }

.action-feedback {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

    .action-feedback:hover {
        box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    }

/* PWA Install Button */
.btn-pwa-install {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.25);
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-pwa-install:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

    .btn-pwa-install:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
    }

    .btn-pwa-install i {
        font-size: 0.9rem;
    }

/* Sponsor Modal */
.sponsor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    overflow-y: scroll;
    padding-top: 20vh;
}

    .sponsor-modal.active {
        display: flex;
    }

.sponsor-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sponsor-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

    .sponsor-close:hover {
        color: #374151;
    }

.sponsor-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sponsor-description {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.sponsor-methods {
    display: grid;
    gap: 15px;
}

.sponsor-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 0;
    overflow-x: hidden;
}

    .sponsor-method:hover {
        border-color: #667eea;
        background: #f9fafb;
        transform: translateX(5px);
    }

.sponsor-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

    .sponsor-method-icon.coffee {
        background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
        color: white;
    }

    .sponsor-method-icon.paypal {
        background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%);
        color: white;
    }

    .sponsor-method-icon.crypto {
        background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
        color: white;
    }

.sponsor-method-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.sponsor-method-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Feedback Modal */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

    .feedback-modal.active {
        display: flex;
    }

.feedback-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 100%;
    position: relative;
    animation: fadeInUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.feedback-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

    .feedback-close:hover {
        color: #374151;
    }

.feedback-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feedback-description {
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .feedback-form-group label {
        font-weight: 600;
        color: #374151;
        font-size: 0.95rem;
    }

        .feedback-form-group label .required {
            color: #ef4444;
        }

    .feedback-form-group input,
    .feedback-form-group textarea,
    .feedback-form-group select {
        padding: 12px 15px;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        font-family: inherit;
    }

        .feedback-form-group input:focus,
        .feedback-form-group textarea:focus,
        .feedback-form-group select:focus {
            outline: none;
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }

    .feedback-form-group textarea {
        resize: vertical;
        min-height: 120px;
    }

    .feedback-form-group small {
        color: #9ca3af;
        font-size: 0.85rem;
    }

.feedback-current-page {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .feedback-current-page i {
        color: #06b6d4;
    }

.feedback-submit-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

    .feedback-submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
    }

    .feedback-submit-btn:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
    }

/* Back to Top Button (Scroll to Top) */
.back-to-top {
    position: fixed;
    bottom: 190px;
    right: 30px;
    z-index: 999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
}

    .back-to-top.show {
        display: flex;
        opacity: 1;
    }

    .back-to-top:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn-pwa-install {
        padding: 6px 15px;
        font-size: 0.85rem;
    }

        .btn-pwa-install span {
            display: none;
        }

        .btn-pwa-install i {
            margin: 0;
            font-size: 1.1rem;
        }

    .language-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .language-dropdown {
        bottom: 85px;
        right: 20px;
        min-width: 260px;
    }

    .actions-menu-container {
        bottom: 90px;
        right: 20px;
    }

    .actions-menu-button {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .action-item-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .action-item-label {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .sponsor-content {
        padding: 30px 20px;
    }

    .feedback-content {
        padding: 30px 20px;
    }

    .sponsor-title {
        font-size: 1.5rem;
    }

    .back-to-top {
        bottom: 165px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

/* ========== Navbar Search Button ========== */
.nav-search-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 1rem;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

    .nav-search-btn:hover {
        background: #f9fafb;
        border-color: #667eea;
        color: #667eea;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    }

/* ========== Search Panel (全螢幕覆蓋) ========== */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

    .search-panel.active {
        display: flex;
    }

.search-panel-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 1.2rem;
}

    .search-panel-close:hover {
        background: #667eea;
        color: white;
        transform: rotate(90deg);
    }

.search-panel-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-panel-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Search Input Styles */
.search-panel .search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-panel .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.2rem;
    pointer-events: none;
}

.search-panel .search-input {
    width: 100%;
    padding: 18px 60px 18px 60px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

    .search-panel .search-input:focus {
        outline: none;
        border-color: #667eea;
        background: white;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    }

.search-panel .clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

    .search-panel .clear-search-btn:hover {
        color: #667eea;
    }

/* Search Suggestions */
.search-panel .search-suggestions {
    margin-top: 20px;
    background: #f9fafb;
    border-radius: 16px;
    max-height: 400px;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

.search-panel .suggestions-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    border-radius: 16px 16px 0 0;
}

.search-panel .suggestions-count {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.search-panel .suggestions-list {
    padding: 10px;
}

.search-panel .suggestion-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
}

    .search-panel .suggestion-item:hover {
        background: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

        .search-panel .suggestion-item:hover .suggestion-title,
        .search-panel .suggestion-item:hover .suggestion-desc,
        .search-panel .suggestion-item:hover .suggestion-tag {
            color: white;
        }

        .search-panel .suggestion-item:hover .suggestion-icon {
            background: white;
            color: #667eea;
        }

        .search-panel .suggestion-item:hover .relevance-badge {
            background: rgba(255, 255, 255, 0.3);
            color: white;
        }

.search-panel .suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.search-panel .suggestion-content {
    flex: 1;
    min-width: 0;
}

.search-panel .suggestion-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

    .search-panel .suggestion-title mark {
        background: rgba(102, 126, 234, 0.2);
        color: #667eea;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 700;
    }

.search-panel .suggestion-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

    .search-panel .suggestion-desc mark {
        background: rgba(102, 126, 234, 0.15);
        color: #667eea;
    }

.search-panel .suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.search-panel .suggestion-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-panel .suggestion-score {
    flex-shrink: 0;
}

.search-panel .relevance-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-panel .no-results {
    padding: 60px 20px;
    text-align: center;
}

    .search-panel .no-results i {
        font-size: 4rem;
        color: #d1d5db;
        margin-bottom: 20px;
    }

    .search-panel .no-results p {
        color: #6b7280;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .search-panel .no-results .no-results-hint {
        color: #9ca3af;
        font-size: 0.9rem;
    }

/* Popular Searches */
.search-panel .popular-searches {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.search-panel .popular-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
    margin-right: 10px;
}

.search-panel .popular-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

    .search-panel .popular-tag:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-panel {
        padding-top: 20px;
    }

    .search-panel-content {
        padding: 30px 20px;
        width: 95%;
        max-height: 90vh;
    }

    .search-panel-title {
        font-size: 1.5rem;
    }

    .search-panel .suggestion-item {
        flex-direction: column;
        gap: 10px;
    }

    .search-panel .suggestion-score {
        align-self: flex-start;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== Navigation Dropdown Optimization ========== */

/* 基礎滾動支援 - 適用於所有下拉選單 (只在顯示時套用) */
.navbar .dropdown-menu.show {
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 自定義滾動條樣式 */
.navbar .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.navbar .dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.navbar .dropdown-menu::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.navbar .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 雙欄顯示 - 教育與生涯 (32個計算器) */
.nav-item.education-mega .dropdown-menu.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-width: 620px;
    max-width: 700px;
    padding: 15px;
}

/* 雙欄顯示 - 個人財務 & 房產 (16個計算器) */
.nav-item.finance-mega .dropdown-menu.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-width: 620px;
    max-width: 700px;
    padding: 15px;
}

/* 修正 <li> 的 display，讓子元素的 grid-column 能夠生效 */
.nav-item.education-mega .dropdown-menu.show > li,
.nav-item.finance-mega .dropdown-menu.show > li {
    display: contents; /* 讓 <li> 變透明，子元素直接參與 Grid 佈局 */
}

/* 寬鬆呼吸感設計 */
.nav-item.education-mega .dropdown-header,
.nav-item.finance-mega .dropdown-header {
    display: block; /* 覆寫 Bootstrap 的 display: list-item，讓 grid-column 生效 */
    padding: 12px 15px 8px;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.95rem;
    grid-column: 1 / -1; /* 跨越所有欄位，強制新一列，並靠左對齊 */
}

.nav-item.education-mega .dropdown-item,
.nav-item.finance-mega .dropdown-item {
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.nav-item.education-mega .dropdown-item:hover,
.nav-item.finance-mega .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(3px);
}

.nav-item.education-mega .dropdown-divider,
.nav-item.finance-mega .dropdown-divider {
    display: block; /* 覆寫 Bootstrap 的預設 display，讓 grid-column 生效 */
    margin: 10px 0;
    opacity: 0.3;
    grid-column: 1 / -1; /* 分隔線也跨越所有欄位 */
}

/* 響應式設計 - 平板 */
@media (max-width: 991px) {
    .nav-item.education-mega .dropdown-menu.show,
    .nav-item.finance-mega .dropdown-menu.show {
        grid-template-columns: 1fr;
        min-width: 320px;
        max-height: 70vh;
    }

    /* 平板/手機模式：子分類標題和分隔線只跨一欄 */
    .nav-item.education-mega .dropdown-header,
    .nav-item.finance-mega .dropdown-header,
    .nav-item.education-mega .dropdown-divider,
    .nav-item.finance-mega .dropdown-divider {
        grid-column: span 1;
    }
}

/* 響應式設計 - 手機 */
@media (max-width: 576px) {
    .navbar .dropdown-menu.show {
        max-height: 65vh;
    }

    .nav-item.education-mega .dropdown-menu.show,
    .nav-item.finance-mega .dropdown-menu.show {
        min-width: 100%;
        padding: 10px;
    }

    .nav-item.education-mega .dropdown-item,
    .nav-item.finance-mega .dropdown-item {
        padding: 12px 15px; /* 手機上增加觸控面積 */
    }
}
