/* 通用主题样式 - general.css */
@import url('../media/font/noto-sans-sc.css');

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

:root {
    --green-light: #dcfce7;
    --green-medium: #4ade80;
    --green-dark: #16a34a;
    --green-glow: rgba(74, 222, 128, 0.5);
    --pink-light: #fce7f3;
    --pink-medium: #f472b6;
    --pink-dark: #db2777;
    --pink-glow: rgba(244, 114, 182, 0.5);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background: #0f172a;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 动态渐变背景 */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(244, 114, 182, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(74, 222, 128, 0.05) 0%, transparent 70%);
    animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    33% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
    66% {
        transform: scale(0.95) rotate(-3deg);
        opacity: 0.9;
    }
}

/* 粒子画布 */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 浮动装饰球 */
.floating-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--green-medium), transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--pink-medium), transparent);
    top: 50%;
    right: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--green-light), transparent);
    bottom: -50px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* 网格背景 */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    perspective: 1000px;
}

/* 玻璃拟态卡片 */
.card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    padding: 60px 48px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 100px rgba(74, 222, 128, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.6s ease;
    animation: cardAppear 1s ease-out;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 
        0 35px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 120px rgba(74, 222, 128, 0.15);
}

/* Logo区域 */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--green-glow));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px var(--green-glow));
    }
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, var(--green-medium) 50%, var(--pink-medium) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 输入区域 */
.input-section {
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 20px 24px 20px 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 16px;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--green-medium);
    box-shadow: 
        0 0 0 4px rgba(74, 222, 128, 0.1),
        0 0 30px rgba(74, 222, 128, 0.2);
    transform: translateY(-2px);
}

.input-field:focus::placeholder {
    color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.input-field:focus + .input-icon,
.input-group:focus-within .input-icon {
    color: var(--green-medium);
    transform: translateY(-50%) scale(1.1);
}

/* 输入框光效 */
.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    background: linear-gradient(135deg, 
        rgba(74, 222, 128, 0.2) 0%, 
        transparent 50%, 
        rgba(244, 114, 182, 0.2) 100%);
}

.input-group:focus-within .input-glow {
    opacity: 1;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, 
        var(--green-dark) 0%, 
        var(--green-medium) 50%, 
        var(--pink-medium) 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 10px 30px rgba(74, 222, 128, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.submit-btn:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 
        0 20px 40px rgba(74, 222, 128, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset,
        0 0 60px rgba(74, 222, 128, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.8s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

/* 按钮文字 */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* 底部链接 */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green-medium), var(--pink-medium));
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #fff;
}

.footer-link:hover::after {
    width: 100%;
}

/* 加载动画 */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .loading-spinner {
    display: inline-block;
}

/* 成功状态 */
.success-check {
    display: none;
    width: 24px;
    height: 24px;
}

.submit-btn.success .btn-text,
.submit-btn.success .loading-spinner {
    display: none;
}

.submit-btn.success .success-check {
    display: inline-block;
}

/* 装饰线条 */
.decoration-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 32px;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.3), transparent);
    height: 1px;
    width: 100%;
    animation: lineMove 8s linear infinite;
}

.line-1 { top: 20%; animation-delay: 0s; }
.line-2 { top: 50%; animation-delay: -2s; }
.line-3 { top: 80%; animation-delay: -4s; }

@keyframes lineMove {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* 闪烁星星效果 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.8);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 100px rgba(74, 222, 128, 0.1);
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--green-medium) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.modal-body {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.modal-body h3 {
    color: #fff;
    margin: 24px 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-body ul {
    margin: 16px 0;
    padding-left: 24px;
}

.modal-body li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-body a {
    color: var(--green-medium);
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal-body a:hover {
    color: var(--green-light);
    text-decoration: underline;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--green-medium), var(--pink-medium));
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--green-dark), var(--pink-dark));
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* 响应式设计 */
@media (max-width: 520px) {
    .card {
        padding: 40px 28px;
        border-radius: 24px;
    }

    .title {
        font-size: 28px;
    }

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

    .input-field {
        padding: 16px 20px 16px 52px;
    }

    .submit-btn {
        padding: 18px 24px;
    }

    .modal-content {
        padding: 32px 24px;
        border-radius: 20px;
    }

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