/* Instagram风格深色模式样式 */
:root {
    /* 深色主题颜色 */
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #262626;
    --bg-input-focus: #363636;
    
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --text-muted: #737373;
    
    --accent-primary: #E1306C;
    --accent-secondary: #F56040;
    --accent-gradient: linear-gradient(45deg, #E1306C, #F56040, #F77737, #FCAF45);
    
    --border-color: #363636;
    --border-hover: #4a4a4a;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.app-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    margin-bottom: 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 28px;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

/* Main Content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.card-header-compact:hover {
    background: var(--bg-secondary);
}

.collapsible-header {
    user-select: none;
}

.collapse-icon {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.collapsible-content.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.card-body {
    padding: 20px;
}

.card-body-compact {
    padding: 14px 16px;
}

/* Input Styles */
.input-wrapper {
    margin-bottom: 20px;
}

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

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
    outline: none;
}

.input-field:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

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

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

.btn-loader {
    animation: spin 1s linear infinite;
}

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

/* Statistics Display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Map Statistics */
.map-stats-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.map-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.map-name {
    font-weight: 500;
    color: var(--text-primary);
}

.map-count {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Uncollected Wings */
.uncollected-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uncollected-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.uncollected-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-left: 6px;
    border-left: 2px solid var(--accent-primary);
}

.wing-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.wing-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-secondary);
    border-radius: var(--radius-sm);
    padding: 10px;
    transition: var(--transition);
    cursor: default;
}

.wing-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.wing-item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 4px;
    word-break: break-all;
    line-height: 1.3;
}

.wing-item-id {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.wing-item-status {
    font-size: 11px;
    color: var(--accent-secondary);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

/* Season Statistics */
.season-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.season-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.season-name {
    font-weight: 500;
    color: var(--text-primary);
}

.season-count {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Error Message */
.error-message {
    background: rgba(225, 48, 108, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
}

/* Footer */
.app-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.app-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
    .app-container {
        padding: 16px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .stat-item {
        padding: 8px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .map-stats-list {
        grid-template-columns: 1fr;
    }
    
    .wing-items {
        grid-template-columns: 1fr;
    }
    
    .card-header,
    .card-body,
    .card-header-compact,
    .card-body-compact {
        padding: 12px;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}
