html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

body {
    min-width: 320px;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
label:focus-within {
    outline: 2px solid #1890ff;
    outline-offset: 3px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid rgba(24, 144, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 144, 255, 0.36);
    box-shadow: 0 10px 26px rgba(24, 144, 255, 0.22);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

.theme-toggle__track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 68px;
    height: 32px;
    border-radius: 7px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fbff 0%, #eaf6ff 55%, #fff3d6 100%);
}

.theme-toggle__track::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #233044 0%, #111827 55%, #0f766e 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.theme-toggle__icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.95rem;
    transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.theme-toggle__icon--sun {
    color: #fa8c16;
}

.theme-toggle__icon--moon {
    color: #7c8aa5;
    opacity: 0.62;
}

.theme-toggle__thumb {
    position: absolute;
    z-index: 1;
    left: 3px;
    top: 3px;
    width: 28px;
    height: 26px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

html.dark .theme-toggle {
    border-color: rgba(82, 196, 26, 0.28);
    background: rgba(29, 36, 46, 0.86);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html.dark .theme-toggle:hover {
    border-color: rgba(82, 196, 26, 0.48);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

html.dark .theme-toggle__track::before {
    opacity: 1;
}

html.dark .theme-toggle__icon--sun {
    color: #f8c56d;
    opacity: 0.58;
}

html.dark .theme-toggle__icon--moon {
    color: #c7f9cc;
    opacity: 1;
    transform: scale(1.05);
}

html.dark .theme-toggle__thumb {
    transform: translateX(34px);
    background: #18202b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
}

.page-title {
    letter-spacing: 0;
}

.transition-all-300 {
    transition: all 0.3s ease;
}

.btn-hover-animate {
    transform: translateZ(0);
}

.btn-hover-animate:hover {
    transform: translateY(-1px);
}

.btn-press:active,
.btn-hover-animate:active {
    transform: translateY(0) scale(0.98);
}

.service-links {
    gap: 0.8rem;
}

.service-link {
    min-height: 3.35rem;
    padding: 0.75rem 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.service-link i,
.service-link span {
    flex-shrink: 0;
}

.bind-card,
.wechat-card {
    background: linear-gradient(135deg, #07c160 0%, #06ad55 100%);
}

.avatar-container {
    position: relative;
}

.avatar-container::after {
    content: attr(data-fallback);
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.avatar-container::after {
    background: linear-gradient(135deg, #1890ff, #52c41a);
    font-size: 0.95rem;
}

.avatar-container.image-missing::after {
    display: flex;
}

.avatar-container.image-missing img {
    display: none;
}

.avatar-rotate:hover .avatar-image {
    transform: rotate(3deg) scale(1.04);
}

.avatar-image {
    transition: transform 0.4s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.animate-slide-in-left,
.animate-slide-in-up,
.animate-fade-in {
    opacity: 0;
}

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

@media (max-width: 360px) {
    .service-links {
        gap: 0.6rem;
    }

    .service-link {
        min-height: 3.1rem;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        font-size: 0.9rem;
    }

    .service-link i {
        margin-right: 0.35rem;
    }

}
