﻿/* Global Styles */
body {
    background-color: #f7f8fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0 0 80px 0;
    /* Padding for bottom nav */
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Typography */
.big-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 20px 0;
    letter-spacing: -0.5px;
}

.sub-category {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
    /* Align text baselines */
    gap: 8px;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.sub-category i {
    color: #ff4d4f;
    margin-right: 4px;
}

/* Card Container */
.box {
    background: #fff;
    margin: 15px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* List Items */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-wrap {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.list-container>a:last-child .item-wrap {
    border-bottom: none;
}

.item-wrap:active {
    background-color: #f9f9f9;
}

.no-logo {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.no-logo::after {
    content: '>';
    font-size: 14px;
    color: #ccc;
    font-weight: 400;
    margin-left: 10px;
}

.desc {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}

/* Hot Section Specifics */
#hot .item-wrap {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px dashed #eee;
}

#hot .item-wrap:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#hot .small-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#hot .blue-btn a {
    font-size: 0.85rem;
    color: #1677ff;
    font-weight: 600;
    background: rgba(22, 119, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

#hot .desc {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
}

#hot .warp-box {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

#hot .item-mini {
    flex: 1;
}

#hot .item-mini img {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Add shadow to images instead of container */
}

#hot .img-wrap {
    margin-top: 5px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Add shadow to images instead of container */
}

#hot .img-wrap img {
    width: 100%;
    display: block;
}

/* Bottom Navigation */
.nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav__list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 60px;
}

.nav__item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.85rem;
    gap: 4px;
    width: 100%;
    height: 100%;
}

.nav__link i {
    font-size: 1.2rem;
}

.nav__icon {
    font-weight: 500;
}

/* Active State (can be added via JS or just hover for now) */
.nav__link:active {
    color: #1677ff;
}

/* Modal Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #fff;
    width: 85%;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90%;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #666;
    cursor: pointer;
}

.tab.active,
.tab.enable {
    color: #1677ff;
    border-bottom: 2px solid #1677ff;
}

.panels {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.panel {
    display: none;
}

.panel.enable {
    display: block;
}

.modal-footer {
    padding: 0 20px 20px 20px;
    background: #fff;
    flex-shrink: 0;
}

.close-button {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
    margin-top: 0;
    cursor: pointer;
}

/* Dynamic Modal Styles */
.modal-body {
    padding: 20px;
}

.modal-banner {
    width: 100%;
    display: block;
    border-bottom: 1px solid #eee;
}

.qr-code {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.open {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.modal h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #333;
}

.modal p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal h4 {
    margin: 15px 0 10px 0;
    font-size: 1rem;
    color: #333;
}

/* Grid Actions for More Section */
.grid-actions {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.grid-btn {
    flex: 1;
    background: #f5f7fa;
    color: #333;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-btn:active {
    background: #e6e8eb;
    transform: scale(0.98);
}


/* New Tag Style */
.item-wrap {
    position: relative;
}

.new-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    background-color: #ff4d4f;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(255, 77, 79, 0.2);
}
