/* 全局样式 */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 动画效果 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮动画 */
.btn-primary {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 毛玻璃效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 加载动画 */
.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 模态框动画 */
.modal-enter-active, .modal-leave-active {
    transition: all 0.3s ease;
}

.modal-enter-from, .modal-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

/* 产品图标样式 */
.product-icon {
    width: 64px;
    height: 64px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 激活码展示区域 */
.license-code-display {
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    word-break: break-all;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    font-size: 14px;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideInRight 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 搜索框样式 */
.search-container {
    position: relative;
}

.search-input {
    padding-left: 44px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
    pointer-events: none;
    font-size: 14px;
}

/* 首页统计信息样式 */
.home-stats {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #cbd5e1, transparent);
}

/* 打字机效果 */
.typewriter-text {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typewriter-cursor {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .license-code-display {
        font-size: 12px;
        padding: 12px;
        max-height: 200px;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .home-stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        font-size: 14px;
        padding: 6px 12px;
    }

    .stat-divider {
        display: none;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px;  /* 避开底部导航栏 */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* JRebel页面特殊样式 */
.jrebel-container {
    overflow-x: auto;
}

.jrebel-step {
    min-width: 0;
    word-wrap: break-word;
}

/* 配置说明区域 */
.config-section {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
}

.config-code {
    background: #1f2937;
    color: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-x: auto;
    word-break: break-all;
}

/* 配置步骤优化 */
.config-step {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.config-step-content {
    min-width: 0;
    flex: 1;
}

/* 暗黑模式样式 */
html.dark {
    filter: invert(1) hue-rotate(180deg);
}

/* 只有在没有View Transition时才使用CSS过渡 */
html:not(.view-transition-active) {
    transition: filter 300ms ease;
}

html.dark img,
html.dark video,
html.dark .avatar,
html.dark .image,
html.dark .thumb,
html.dark [class*="icon-"],
html.dark .product-icon {
    filter: invert(1) hue-rotate(180deg);
}

/* 主题切换按钮样式 */
.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .theme-toggle::before {
    transform: translateX(24px);
}

.theme-toggle .theme-icon {
    font-size: 12px;
    color: white;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
}

.theme-toggle .moon-icon {
    opacity: 0;
}

html.dark .theme-toggle .sun-icon {
    opacity: 0;
}

html.dark .theme-toggle .moon-icon {
    opacity: 1;
}

/* View Transition API 动画样式 */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2147483646;
}

html.dark::view-transition-old(root) {
    z-index: 2147483646;
}

html.dark::view-transition-new(root) {
    z-index: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .license-code-display {
        font-size: 12px;
        padding: 12px;
        max-height: 200px;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .config-code {
        font-size: 11px;
        padding: 8px;
        white-space: pre-wrap;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    .config-section {
        padding: 12px;
        margin: 12px 0;
    }

    /* 配置步骤移动端优化 */
    .config-step-mobile {
        flex-direction: column;
        space-y: 12px;
    }

    .config-step-mobile .config-step-content {
        margin-left: 0;
        margin-top: 8px;
    }

    /* 首页内容移动端优化 */
    .home-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .home-title {
        font-size: 28px;
        line-height: 1.2;
    }

    .home-subtitle {
        font-size: 16px;
        line-height: 1.4;
    }

    /* 主题切换按钮移动端优化 */
    .theme-toggle {
        width: 45px;
        height: 24px;
        border-radius: 12px;
    }

    .theme-toggle::before {
        width: 20px;
        height: 20px;
    }

    html.dark .theme-toggle::before {
        transform: translateX(21px);
    }

    .theme-toggle .theme-icon {
        font-size: 10px;
    }
}

/* 验证码遮罩样式 */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

.verification-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 540px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    margin: auto;
}

.verification-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse 2s ease-in-out infinite;
}

.verification-icon i {
    font-size: 36px;
    color: white;
}

.verification-title {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 12px;
}

.verification-subtitle {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
}

/* 公众号二维码样式 */
.qrcode-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.qrcode-wrapper {
    text-align: center;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;
}

.qrcode-wrapper:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.qrcode-image {
    width: 180px;
    height: 180px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    background: #f9fafb;
}

.qrcode-label {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verification-steps {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.verification-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.verification-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 12px;
}

.step-text {
    flex: 1;
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
}

.step-highlight {
    color: #7c3aed;
    font-weight: 600;
}

.verification-input-group {
    margin: 24px 0;
}

.verification-input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.verification-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 500;
}

.verification-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.verification-input.error {
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

.verification-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.verification-error i {
    margin-right: 6px;
}

.verification-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.verification-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verification-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.verification-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.verification-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.verification-btn i {
    margin-right: 8px;
}

.verification-success {
    text-align: center;
    animation: bounceIn 0.6s ease;
}

.verification-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.verification-success-icon i {
    font-size: 40px;
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .verification-overlay {
        padding: 10px 0;
    }

    .verification-modal {
        padding: 30px 20px;
        max-width: 90%;
    }

    .verification-icon {
        width: 64px;
        height: 64px;
    }

    .verification-icon i {
        font-size: 28px;
    }

    .verification-title {
        font-size: 20px;
    }

    .verification-subtitle {
        font-size: 14px;
    }

    .qrcode-image {
        width: 150px;
        height: 150px;
    }

    .qrcode-wrapper {
        padding: 12px;
    }

    .qrcode-label {
        font-size: 13px;
        margin-top: 8px;
    }

    .step-text {
        font-size: 13px;
    }

    .verification-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}