/* 官方功能弹窗样式 */
#official-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
    box-sizing: border-box;
}

/* 当overlay显示时使用flex布局 */
#official-popup-overlay[style*="flex"] {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

#official-popup {
    background: #f5f5dc;
    border-radius: 8px;
    width: 85%;
    max-width: 420px;
    max-height: 80vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: auto;
    -webkit-overflow-scrolling: touch;
}

.popup-header {
    background: #2d8f8f;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 44px;
    box-sizing: border-box;
}

.popup-countdown {
    font-size: 14px;
    font-weight: bold;
    flex: 1;
    word-break: break-word;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    margin-left: 10px;
}

.popup-close:hover {
    opacity: 0.8;
}

.popup-close:active {
    opacity: 0.6;
    transform: scale(0.95);
}

.popup-content {
    padding: 20px;
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-info-item {
    margin-bottom: 12px;
    word-break: break-all;
}

.popup-info-label {
    font-weight: bold;
    margin-right: 8px;
    display: inline-block;
    min-width: 70px;
}

.popup-info-link {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.3);
    touch-action: manipulation;
    display: inline-block;
    padding: 2px 4px;
    margin: -2px -4px;
}

.popup-info-link:hover {
    color: #004499;
}

.popup-info-link:active {
    color: #003366;
}

.popup-notice {
    color: #666;
    font-size: 12px;
    margin-top: 15px;
    margin-bottom: 10px;
    word-break: break-word;
}

.popup-notice-blue {
    color: #0066cc;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: rgba(0, 102, 204, 0.3);
    touch-action: manipulation;
    display: inline-block;
    padding: 2px 4px;
    margin: -2px -4px;
}

.popup-notice-blue:active {
    color: #003366;
}

.popup-address-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.popup-address-btn {
    background: #2d8f8f;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.2s, transform 0.1s;
    box-sizing: border-box;
}

.popup-address-btn:hover {
    background: #257575;
}

.popup-address-btn:active {
    background: #1f5f5f;
    transform: scale(0.98);
}

.popup-recommend-title {
    font-weight: bold;
    font-size: 16px;
    margin: 20px 0 15px 0;
    color: #333;
}

.popup-app-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.popup-app-btn {
    background: #2d8f8f;
    color: white;
    border: none;
    padding: 12px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.2s, transform 0.1s;
    word-break: break-word;
    box-sizing: border-box;
}

.popup-app-btn:hover {
    background: #257575;
}

.popup-app-btn:active {
    background: #1f5f5f;
    transform: scale(0.98);
}

.popup-save-btn {
    background: #2d8f8f;
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.2s, transform 0.1s;
    box-sizing: border-box;
}

.popup-save-btn:hover {
    background: #257575;
}

.popup-save-btn:active {
    background: #1f5f5f;
    transform: scale(0.98);
}

.popup-hand-icon {
    font-size: 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #official-popup-overlay {
        padding: 10px;
        align-items: center;
        box-sizing: border-box;
    }

    #official-popup-overlay[style*="flex"] {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    #official-popup {
        width: 100%;
        max-width: 420px;
        max-height: calc(100vh - 20px);
        border-radius: 8px;
        margin: 0;
    }

    .popup-header {
        padding: 8px 10px;
        border-radius: 8px 8px 0 0;
        min-height: 36px;
    }

    .popup-countdown {
        font-size: 11px;
    }

    .popup-close {
        font-size: 22px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin-left: 8px;
    }

    .popup-content {
        padding: 12px;
        font-size: 12px;
        line-height: 1.6;
    }

    .popup-info-item {
        margin-bottom: 8px;
    }

    .popup-info-label {
        min-width: 60px;
        font-size: 11px;
        margin-right: 6px;
    }

    .popup-info-link {
        font-size: 11px;
        word-break: break-all;
    }

    .popup-notice {
        font-size: 10px;
        margin-top: 10px;
        margin-bottom: 8px;
        line-height: 1.5;
    }

    .popup-notice-blue {
        font-size: 10px;
    }

    .popup-address-buttons {
        gap: 6px;
        margin: 10px 0;
    }

    .popup-address-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-width: 100px;
        min-height: 36px;
        border-radius: 3px;
    }

    .popup-recommend-title {
        font-size: 13px;
        margin: 12px 0 8px 0;
    }

    .popup-app-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 10px;
    }

    .popup-app-btn {
        padding: 8px 4px;
        font-size: 10px;
        min-height: 36px;
        border-radius: 3px;
    }

    .popup-save-btn {
        padding: 10px;
        font-size: 13px;
        min-height: 40px;
        border-radius: 0 0 8px 8px;
        gap: 6px;
    }

    .popup-hand-icon {
        font-size: 16px;
    }
}

/* 小屏幕手机适配 (≤480px) */
@media (max-width: 480px) {
    #official-popup-overlay {
        padding: 8px;
        align-items: center;
        box-sizing: border-box;
    }

    #official-popup {
        width: 85%;
        max-width: 85%;
        max-height: calc(100vh - 16px);
        border-radius: 8px;
        margin: 0;
    }

    .popup-header {
        padding: 7px 8px;
        min-height: 32px;
        border-radius: 8px 8px 0 0;
    }

    .popup-countdown {
        font-size: 10px;
    }

    .popup-close {
        font-size: 20px;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        margin-left: 6px;
    }

    .popup-content {
        padding: 10px;
        font-size: 11px;
        line-height: 1.5;
    }

    .popup-info-item {
        margin-bottom: 6px;
    }

    .popup-info-label {
        min-width: 55px;
        font-size: 10px;
        margin-right: 5px;
    }

    .popup-info-link {
        font-size: 10px;
    }

    .popup-notice {
        font-size: 9px;
        margin-top: 8px;
        margin-bottom: 6px;
    }

    .popup-notice-blue {
        font-size: 9px;
    }

    .popup-address-buttons {
        gap: 5px;
        margin: 8px 0;
    }

    .popup-address-btn {
        padding: 7px 10px;
        font-size: 10px;
        min-width: 90px;
        min-height: 32px;
    }

    .popup-recommend-title {
        font-size: 12px;
        margin: 10px 0 6px 0;
    }

    .popup-app-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        margin-bottom: 8px;
    }

    .popup-app-btn {
        padding: 6px 3px;
        font-size: 9px;
        min-height: 32px;
    }

    .popup-save-btn {
        padding: 8px;
        font-size: 12px;
        min-height: 36px;
        border-radius: 0 0 8px 8px;
        gap: 5px;
    }

    .popup-hand-icon {
        font-size: 14px;
    }
}

/* 横屏适配 (≤480px 横屏) */
@media (max-width: 480px) and (orientation: landscape) {
    #official-popup {
        max-height: 85vh;
    }

    .popup-content {
        padding: 8px 10px;
    }

    .popup-header {
        padding: 6px 8px;
    }

    .popup-info-item {
        margin-bottom: 5px;
    }
}

/* 超小屏幕 (≤360px) */
@media (max-width: 360px) {
    #official-popup-overlay {
        padding: 6px;
    }

    #official-popup {
        max-height: calc(100vh - 12px);
    }

    .popup-header {
        padding: 6px 7px;
        min-height: 30px;
    }

    .popup-countdown {
        font-size: 9px;
    }

    .popup-close {
        font-size: 18px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        margin-left: 5px;
    }

    .popup-content {
        padding: 8px;
        font-size: 10px;
    }

    .popup-info-item {
        margin-bottom: 5px;
    }

    .popup-info-label {
        min-width: 50px;
        font-size: 9px;
        margin-right: 4px;
    }

    .popup-info-link {
        font-size: 9px;
    }

    .popup-notice {
        font-size: 8px;
        margin-top: 6px;
        margin-bottom: 5px;
    }

    .popup-address-btn {
        padding: 6px 8px;
        font-size: 9px;
        min-height: 30px;
        min-width: 80px;
    }

    .popup-recommend-title {
        font-size: 11px;
        margin: 8px 0 5px 0;
    }

    .popup-app-buttons {
        gap: 4px;
    }

    .popup-app-btn {
        font-size: 8px;
        padding: 5px 2px;
        min-height: 30px;
    }

    .popup-save-btn {
        padding: 7px;
        font-size: 11px;
        min-height: 34px;
    }

    .popup-hand-icon {
        font-size: 12px;
    }
}

/* 广告弹窗样式 */
.ad-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
}

.ad-popup-overlay[style*="flex"] {
    display: flex !important;
}

.ad-popup {
    background-color: transparent;
    background: transparent;
    width: 85%;
    max-width: 420px;
    position: relative;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.ad-popup-image-container {
    width: 100%;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
    margin-bottom: 0;
}

.ad-popup-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}

/* 关闭按钮容器 - 透明背景作为间距 */
.ad-popup-close-container {
    width: 100%;
    background-color: transparent !important;
    background: transparent !important;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.ad-popup-close {
    width: auto;
    min-width: 60px;
    height: 50px;
    background: transparent !important;
    border: none;
}

/* 白色圆圈 */
.ad-popup-close-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border:2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
}

.ad-popup-close:hover {
    transform: scale(1.05);
}

.ad-popup-close:active {
    transform: scale(0.95);
}

/* 广告弹窗移动端适配 */
@media (max-width: 768px) {
    .ad-popup-overlay {
        padding: 10px;
    }

    .ad-popup {
        width: 85%;
        max-width: 85%;
        border-radius: 8px;
    }

    .ad-popup-image {
        max-height: 70vh;
    }

    .ad-popup-close-container {
        padding: 15px 12px;
        background-color: transparent !important;
        background: transparent !important;
    }

    .ad-popup-close {
        min-width: 55px;
        height: 45px;
        border: none;
        border-width: 0 !important;
    }

    .ad-popup-close-circle {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ad-popup-overlay {
        padding: 8px;
    }

    .ad-popup {
        width: 85%;
        max-width: 85%;
    }

    .ad-popup-image {
        max-height: 65vh;
    }

    .ad-popup-close-container {
        padding: 12px 10px;
        background-color: transparent !important;
        background: transparent !important;
    }

    .ad-popup-close {
        min-width: 50px;
        height: 40px;
        border: none;
        border-width: 0 !important;
    }

    .ad-popup-close-circle {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    .ad-popup-overlay {
        padding: 6px;
    }

    .ad-popup {
        width: 90%;
        max-width: 90%;
    }

    .ad-popup-image {
        max-height: 60vh;
    }

    .ad-popup-close-container {
        padding: 10px 8px;
        background-color: transparent !important;
        background: transparent !important;
    }

    .ad-popup-close {
        min-width: 45px;
        height: 38px;
        border: none;
    }

    .ad-popup-close-circle {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* Footer 样式 */
#footer {
    width: 100%;
    margin-top: 40px;
}

.footer-top {
    background: #b1d3e0;
    padding: 30px 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.footer-left {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-left h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
}

.footer-left p {
    margin: 8px 0;
    font-size: 13px;
    text-align: left;
}

.footer-left p.footer-small {
    font-size: 12px;
}

.footer-left a {
    text-decoration: underline;
}

.footer-right {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

.footer-nav {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-nav-column h4 {
    margin: 0;
    color: #333;
    font-size: 15px;
    font-weight: bold;
    text-align: left;
}

.footer-nav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.footer-nav-column li {
    margin: 8px 0;
}

.footer-nav-column a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.footer-share {
    color: #333;
    font-size: 15px;
    text-align: left;
    margin: 0 0 10px 0;
    font-weight: bold
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: opacity 0.2s;
    font-size: 0;
    text-indent: -9999px;
    overflow: hidden;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.footer-social a[title="Facebook"] {
    background-image: url('/images/Facebook.png');
}

.footer-social a[title="GitHub"] {
    background-image: url('/images/GitHub.png');
}

.footer-social a[title="Google+"] {
    background-image: url('/images/Google.png');
}

.footer-social a[title="Twitter"] {
    background-image: url('/images/Twitter.png');
}

.footer-social a[title="YouTube"] {
    background-image: url('/images/YouTube.png');
}

.footer-social a:hover {
    opacity: 0.8;
}

.footer-bottom {
    background: #2d7a7a;
    padding: 10px 0;
}

.footer-bottom p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

/* Footer 响应式 */
@media (max-width: 768px) {
    .footer-top {
        padding: 15px 15px;
    }
    
    .footer-left,
    .footer-right {
        min-width: 100%;
    }
    
    .footer-nav {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .footer-top {
        padding: 10px 10px;
    }
    
    .footer-nav {
        justify-content: space-between;
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
