/* ==================== 字体定义 ==================== */
@font-face {
    font-family: 'OPPO Sans';
    src: url('/fonts/OPPO_Sans_4.0/OPPO Sans 4.0.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================== 公共变量 ==================== */
:root {
    --bg-deep: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-glow: #f472b6;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --error-color: #ef4444;
    --success-color: #10b981;
}

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

body {
    font-family: 'OPPO Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
}

/* ==================== 背景系统 ==================== */
.bg-cosmos {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
}

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

.orb-1 { 
    width: 400px; 
    height: 400px; 
    background: var(--accent-primary); 
    top: -100px; 
    left: -100px; 
}

.orb-2 { 
    width: 500px; 
    height: 500px; 
    background: var(--accent-secondary); 
    bottom: -100px; 
    right: -100px; 
    animation-delay: -5s; 
}

.orb-3 { 
    width: 300px; 
    height: 300px; 
    background: var(--accent-glow); 
    top: 40%; 
    left: 40%; 
    filter: blur(100px); 
    opacity: 0.2; 
    animation-delay: -10s; 
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-glass {
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-glass {
    transform: scale(1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.close-icon {
    position: absolute;
    top: -1rem;
    right: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-icon:hover {
    color: var(--text-primary);
}

/* ==================== 按钮 ==================== */
.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

.btn-ghost:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

.toast.highlight {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--glass-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .modal-glass {
        width: 95%;
        padding: 1.5rem;
    }
}