/* 
 * 浅色高级商务风格 - Light Premium Business Style
 * Clean, Professional, Modern Business Design
 */

:root {
    /* Color Palette - Professional Business Blue */
    --primary-start: #3b82f6;
    --primary-end: #1d4ed8;
    --secondary-start: #6366f1;
    --secondary-end: #4f46e5;
    
    --primary-gradient: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    --secondary-gradient: linear-gradient(135deg, var(--secondary-start), var(--secondary-end));
    
    /* Semantic Colors - Business Style */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Neutral Colors - Business */
    --text-main: #0f172a;
    --text-second: #334155;
    --text-third: #64748b;
    --text-white: #ffffff;
    
    /* Backgrounds - Light Business */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-fill: #f1f5f9;
    --bg-input: #ffffff;
    
    /* Border & Shadow - Business */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Layout Constants */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --container-width: 480px;
    --container-width-pc: 800px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 14px;
}

body {
    background: var(--bg-page);
    color: var(--text-main);
    font-family: -apple-system, system-ui, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
}

/* Layout */
.app-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 16px 24px;
}

@media (min-width: 768px) {
    .app-wrapper {
        max-width: var(--container-width-pc);
        padding: 0 24px 40px;
    }
    html {
        font-size: 15px;
    }
}

/* Colorful Announcement Bar */
.notice-bar {
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6, #a855f7, #3b82f6);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
    padding: 12px 20px;
    margin: 0 -16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    position: relative;
}

.notice-icon { 
    font-size: 18px; 
    flex-shrink: 0; 
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.notice-track {
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Typography - Colorful Headings */
h1, h2, h3 { 
    font-weight: 600; 
    color: var(--text-main); 
}

a { 
    color: var(--primary-start); 
    text-decoration: none; 
    transition: all 0.2s ease; 
}

a:hover {
    color: var(--primary-end);
}

/* Navigation */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.nav-header .title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cards - Business Style */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Colorful icon in card title */
.card-title .icon {
    font-size: 20px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 12px;
    color: var(--text-third);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-all;
}

/* Forms */
.form-group { 
    margin-bottom: 20px; 
}

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

.input-wrapper {
    position: relative;
}

input, select, textarea {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 48px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    background: #ffffff;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-third);
}

/* Buttons */
.btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    min-width: 100px;
    padding: 0 20px;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-fill);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

/* Lists */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child { 
    border-bottom: none; 
}

.info-label { 
    color: var(--text-second); 
    font-size: 14px; 
    font-weight: 500;
}

.info-value { 
    color: var(--text-main); 
    font-weight: 600;
    font-size: 14px;
}

.list-item {
    background: var(--bg-fill);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.list-item:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-primary { 
    background: #dbeafe; 
    color: #1d4ed8; 
}

.badge-success { 
    background: var(--success-light); 
    color: var(--success); 
}

.badge-danger { 
    background: var(--danger-light); 
    color: var(--danger); 
}

/* Messages */
.msg {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
}

.msg-success { 
    background: var(--success-light); 
    color: var(--success); 
    border-color: rgba(16, 185, 129, 0.2); 
}

.msg-error { 
    background: var(--danger-light); 
    color: var(--danger); 
    border-color: rgba(239, 68, 68, 0.2); 
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.menu-item {
    background: var(--bg-card);
    padding: 20px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-start);
}

.menu-item .label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-second);
}

/* Price Table */
.price-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.price-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.price-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.price-item-popular {
    border-color: var(--primary-start);
    border-width: 2px;
}

.price-badge {
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 40px;
    font-size: 11px;
    font-weight: 600;
    transform: rotate(45deg);
}

.price-level {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.price-cost {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.price-discount {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    margin-top: 8px;
}

.price-balance {
    font-size: 13px;
    color: var(--text-second);
    margin-top: 6px;
}

/* Pure Avatar - No Background */
.avatar-pure {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    border: 3px solid var(--border-color);
}

.avatar-pure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-fill);
    color: var(--text-second);
    font-size: 24px;
    font-weight: 700;
}

/* Query Result Card */
.query-result-card {
    text-align: center;
    padding: 24px 20px;
}

.result-info {
    text-align: left;
}

.result-qq {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    text-align: center;
}

.result-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.result-detail {
    background: var(--bg-fill);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-second);
    font-size: 13px;
    font-weight: 500;
}

.detail-value {
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
}

.price-desc {
    font-size: 12px;
    color: var(--text-third);
    margin-top: 6px;
}

/* Profile Info (used in proxy center) */
.profile-info {
    background: var(--bg-fill);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-second);
    line-height: 1.8;
}

/* Balance Log Styles */
.log-list {
    padding: 0;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.log-item:last-child {
    border-bottom: none;
}

.log-left {
    flex: 1;
    margin-right: 12px;
}

.log-remark {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 4px;
}

.log-time {
    font-size: 12px;
    color: var(--text-third);
}

.log-money {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.log-money.income {
    color: var(--success);
}

.log-money.expend {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 480px) {
    .app-wrapper {
        padding: 0 12px 20px;
    }
    
    .nav-header .title {
        font-size: 20px;
    }
    
    .card {
        padding: 20px 16px;
    }
    
    .price-table {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-fill);
}

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

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.2);
}
