:root {
    --primary: #0a79f5;
    --primary-light: #0ea5f5;
    --primary-dark: #0658b3;
    --primary-gradient: linear-gradient(135deg, #0a79f5 0%, #0ea5f5 100%);
    --primary-gradient-hover: linear-gradient(135deg, #0869d7 0%, #0b94dd 100%);
    --card-shadow: 0 8px 32px rgba(10, 121, 245, .10);
    --card-shadow-hover: 0 12px 40px rgba(10, 121, 245, .18);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --transition: .25s ease;
}

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

html {
    min-height: 100%;
    background: #dfeaf5;
}

body {
    width: min(500px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 0 70px;
    overflow-x: hidden;
    background: linear-gradient(160deg, #f0f4f8 0%, #e3edf7 100%);
    color: #1a2332;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4286;
    -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus,
a:active,
.arc-btn:hover,
.arc-btn:focus,
.arc-btn:active,
.app-item:hover,
.app-item:focus,
.app-item:active,
.popup-button:hover,
.popup-button:focus,
.popup-button:active,
.btn-custom:hover,
.btn-custom:focus,
.btn-custom:active,
.footer-link:hover,
.footer-link:focus,
.footer-link:active {
    text-decoration: none !important;
}

.main-content {
    width: 100%;
    padding: 0 16px 24px;
}

.header {
    height: 92px;
    padding: 18px 20px 14px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 8px 30px rgba(10, 121, 245, .30);
    text-align: center;
}

.header::before,
.header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, .06);
}

.header::before {
    top: -60%;
    right: -20%;
    width: 200px;
    height: 200px;
}

.header::after {
    bottom: -50%;
    left: -10%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, .04);
}

.logo-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 4px;
}

.logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2.5px solid rgba(255, 255, 255, .60);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

.logo-fallback {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 2px solid #d5ecff;
    border-radius: 50%;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.logo img {
    width: 52px;
    height: 52px;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.brand-text {
    text-align: left;
}

.platform-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.platform-name span {
    font-size: 14px;
    font-weight: 300;
    opacity: .8;
}

.platform-desc {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .3px;
    opacity: .92;
}

.announcement-box {
    margin: 16px 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .70);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .85);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.announcement-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
}

.announcement-title i {
    color: var(--primary);
    font-size: 17px;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-left: 4px;
    border-radius: 50%;
    background: #ff3b6f;
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: .5; }
}

.important {
    display: block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-left: 3px solid #ff3b6f;
    border-radius: 8px;
    background: rgba(255, 59, 111, .08);
    color: #ff3b6f;
    font-size: 13px;
    font-weight: 600;
}

.announcement-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-height: 41px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .04);
}

.announcement-item:last-child {
    border-bottom: 0;
}

.announcement-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    color: #2d3748;
    font-size: 13px;
}

.label-num {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.arc-btn {
    height: 30px;
    min-width: 103px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 5px 18px;
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(10, 121, 245, .25);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 18.5714px;
    white-space: nowrap;
    transition: all var(--transition);
}

.arc-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .15);
    opacity: 0;
    transition: opacity .3s;
}

.arc-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(10, 121, 245, .35);
}

.arc-btn:hover::after {
    opacity: 1;
}

.arc-btn:active {
    transform: scale(.95) translateY(0);
    box-shadow: 0 2px 8px rgba(10, 121, 245, .20);
}

.arc-btn i {
    font-size: 11px;
}

.app-section {
    margin-bottom: 24px;
    padding: 0 4px;
}

.app-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 14px;
    padding-left: 12px;
    border-left: 3.5px solid var(--primary);
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
}

.app-section h2 i {
    color: var(--primary);
    font-size: 18px;
}

.app-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.app-item {
    min-height: 110.36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 6px 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .60);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .85);
    color: #1a2332;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.app-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.app-item:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: var(--card-shadow-hover);
}

.app-item:hover::before {
    opacity: 1;
}

.app-item:active {
    transform: scale(.95) translateY(-2px);
    transition-duration: .1s;
}

.app-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(10, 121, 245, .20);
    font-size: 20px;
    transition: transform var(--transition);
}

.app-item:hover .app-icon {
    transform: scale(1.08);
}

.app-name {
    max-width: 100%;
    overflow: hidden;
    color: #1a2332;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition);
}

.app-item:hover .app-name {
    color: var(--primary);
}

.app-tag {
    margin-top: 2px;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(10, 121, 245, .10);
    color: var(--primary);
    font-size: 8px;
    font-weight: 600;
    line-height: 11.4286px;
}

.app-item.cyan .app-icon {
    background: linear-gradient(135deg, #12b7f5, #0088cc);
}

.app-item.green .app-icon {
    background: linear-gradient(135deg, #07c160, #0a9e49);
}

.app-item.pink .app-icon {
    background: linear-gradient(135deg, #ff3366, #e6005c);
}

.footer {
    width: min(500px, 100%);
    position: fixed;
    right: 0;
    bottom: 0;
    left: 50%;
    z-index: 100;
    transform: translateX(-50%);
    padding: 14px 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, .50);
    background: rgba(255, 255, 255, .70);
    color: #7a8a9e;
    text-align: center;
    font-size: 11px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
}

.footer-link {
    color: var(--primary);
    font-size: 11px;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--primary-dark);
}

.footer p {
    opacity: .6;
    font-size: 10px;
}

.popup-notice {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .60);
    opacity: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity .35s ease;
}

.popup-notice.visible {
    opacity: 1;
}

.popup-content {
    width: 100%;
    max-width: 420px;
    padding: 28px 24px 22px;
    position: relative;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    text-align: center;
    transform: translateY(40px) scale(.96);
    opacity: 0;
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .35s ease;
}

.popup-notice.visible .popup-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.popup-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 14px;
    right: 14px;
    border: 0;
    border-radius: 50%;
    background: #f1f4f8;
    color: #6b7a8e;
    cursor: pointer;
    font-size: 14px;
    transition: all .3s;
}

.popup-close:hover {
    transform: scale(1.1);
    background: #ff3b6f;
    color: #fff;
}

.popup-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 16px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.popup-title i {
    color: var(--primary);
    font-size: 24px;
}

.popup-message {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    background: #f7f9fc;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.7;
}

.popup-message p {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.popup-message p:last-of-type {
    margin-bottom: 0;
}

.popup-message p::before {
    content: "◆";
    position: absolute;
    top: 3px;
    left: 0;
    color: var(--primary);
    font-size: 8px;
}

.popup-message .btn-custom {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 20px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #07c160, #0a9e49);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
}

.popup-message .btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, .30);
}

.popup-button {
    width: 100%;
    display: block;
    padding: 13px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 6px 24px rgba(10, 121, 245, .30);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all var(--transition);
}

.popup-button:hover {
    transform: translateY(-3px);
    background: var(--primary-gradient-hover);
    box-shadow: 0 10px 32px rgba(10, 121, 245, .40);
}

.popup-button:active {
    transform: scale(.97) translateY(0);
}

.popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #8a9aa8;
    font-size: 12px;
}

.popup-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.popup-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

#popupCountdown {
    color: var(--primary);
    font-weight: 500;
}

.mobile-notification {
    min-width: 170px;
    max-width: 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 9999;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    box-shadow: 0 8px 28px rgba(46, 125, 50, .35);
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -18px) scale(.96);
    transition: all .5s cubic-bezier(.34, 1.56, .64, 1);
}

.mobile-notification.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.mobile-notification.hide {
    opacity: 0;
    transform: translate(-50%, -18px) scale(.96);
}

.notification-icon {
    flex: 0 0 auto;
    color: #c8e6c9;
    font-size: 16px;
}

.notification-content {
    flex: 1;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 16px 24px;
    }

    .header {
        padding: 14px 16px 12px;
    }

    .logo {
        width: 48px;
        height: 48px;
    }

    .logo-fallback {
        width: 38px;
        height: 38px;
        font-size: 12px;
    }

    .logo img {
        width: 44px;
        height: 44px;
    }

    .platform-name {
        font-size: 16px;
    }

    .platform-name span {
        font-size: 13px;
    }

    .platform-desc {
        font-size: 11px;
    }

    .announcement-text {
        font-size: 12px;
    }

    .arc-btn {
        min-width: auto;
        height: 26px;
        padding: 3px 12px;
        font-size: 11px;
    }

    .app-list {
        gap: 10px;
    }

    .popup-content {
        padding: 20px 16px 16px;
    }

    .popup-message {
        padding: 12px 14px;
        font-size: 12.5px;
    }

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

    .mobile-notification {
        top: 12px;
        left: 50%;
        min-width: 140px;
        max-width: 200px;
        padding: 8px 12px;
    }

    .notification-content {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
