/* 全局样式 - 活泼友好风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B6B;
    --primary-dark: #EE5A52;
    --primary-light: #FF8787;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --success: #51CF66;
    --danger: #FF6B6B;
    --warning: #FFA94D;
    --purple: #A78BFA;
    --pink: #F472B6;
    --dark: #2D3748;
    --dark-light: #4A5568;
    --gray: #718096;
    --gray-light: #E2E8F0;
    --gray-lighter: #F7FAFC;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.6) 0%, transparent 70%);
    top: -15%;
    left: -15%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.6) 0%, transparent 70%);
    bottom: -15%;
    right: -15%;
    animation-delay: 8s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 230, 109, 0.5) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(50px, -50px) scale(1.1) rotate(90deg); }
    50% { transform: translate(-30px, 30px) scale(0.9) rotate(180deg); }
    75% { transform: translate(40px, 40px) scale(1.05) rotate(270deg); }
}

.floating-shape {
    position: absolute;
    font-size: 32px;
    animation: floatShape 15s ease-in-out infinite;
    opacity: 0.6;
}

.shape-1 { top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { top: 20%; right: 15%; animation-delay: 3s; }
.shape-3 { bottom: 15%; left: 20%; animation-delay: 6s; }
.shape-4 { bottom: 20%; right: 10%; animation-delay: 9s; }

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-emoji {
    font-size: 72px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    margin-bottom: 16px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-emoji {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px 14px 52px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    padding: 14px 16px;
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--gray);
}

.error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
}

.btn-emoji {
    font-size: 20px;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 2px dashed var(--gray-light);
}

.login-footer p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 8px;
}

.login-footer strong {
    color: var(--primary);
    font-weight: 700;
}

.tip {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 500;
}

/* 管理界面 */
.admin-container {
    display: none;
    min-height: 100vh;
    background: var(--gray-lighter);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--white);
    border-right: 3px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 3px solid var(--gray-light);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
}

.sidebar-header .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.sidebar-header .logo-emoji {
    font-size: 36px;
    animation: rotate 10s linear infinite;
}

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

.logo-title {
    font-size: 20px;
    font-weight: 800;
}

.logo-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gray-lighter);
    color: var(--dark);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.nav-emoji {
    font-size: 22px;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent);
    color: var(--dark);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px;
    border-top: 3px solid var(--gray-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-lighter);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.user-avatar {
    font-size: 32px;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.user-status {
    font-size: 12px;
    color: var(--gray);
}

.btn-ghost {
    background: transparent;
    color: var(--gray);
    width: 100%;
    border: 2px solid var(--gray-light);
}

.btn-ghost:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.main-content {
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-light);
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.section-header p {
    color: var(--gray);
    font-size: 15px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid var(--gray-light);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 24px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.nav-card {
    position: relative;
    padding: 24px;
    border: 3px solid var(--gray-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    background: var(--white);
}

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

.nav-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.nav-icon-preview {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.nav-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-icon-preview span {
    font-size: 28px;
}

.nav-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.nav-card p {
    font-size: 13px;
    color: var(--gray);
    word-break: break-all;
}

.nav-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--gray-light);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--purple) 100%);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--warning) 100%);
    color: var(--white);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 启动图预览 */
.splash-preview {
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-lighter) 0%, var(--white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--gray-light);
}

.splash-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.preview-placeholder {
    text-align: center;
    color: var(--gray);
}

.preview-emoji {
    font-size: 80px;
    display: block;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

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

.preview-placeholder p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.preview-hint {
    font-size: 13px;
    color: var(--gray);
}

/* 版本信息 */
.version-info {
    min-height: 200px;
}

.version-display {
    padding: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 50%, var(--purple) 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.version-display h4 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.version-display p {
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 6px;
}

.version-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 13px;
    margin-top: 12px;
    font-weight: 600;
}

.info-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--gray);
}

.info-placeholder .preview-emoji {
    font-size: 72px;
}

/* 复选框 */
.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    background: var(--gray-lighter);
    border-radius: var(--radius);
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--gray-light);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-light);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--success) 0%, var(--secondary) 100%);
    border-color: var(--success);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: 900;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--gray-light);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-lighter);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 24px;
    color: var(--gray);
    font-weight: 700;
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.modal-actions .btn {
    flex: 1;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
    grid-column: 1/-1;
}

.empty-state svg,
.empty-state span {
    font-size: 96px;
    display: block;
    margin: 0 auto 24px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 28px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 28px 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--gray-lighter);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
}

/* Logo 预览 */
.logo-preview {
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-lighter) 0%, var(--white) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--gray-light);
    padding: 40px;
}

.logo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

.logo-display {
    text-align: center;
}

.logo-display h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.logo-display p {
    font-size: 14px;
    color: var(--gray);
}
