/**
 * Apple-Style CSS for ALE Mod
 * 商城、帮助中心等页面的统一视觉风格
 */

:root {
    --apple-primary: #007AFF;
    --apple-secondary: #5856D6;
    --apple-success: #34C759;
    --apple-warning: #FF9500;
    --apple-error: #FF3B30;
    --apple-gray-50: #F9FAFB;
    --apple-gray-100: #F3F4F6;
    --apple-gray-200: #E5E7EB;
    --apple-gray-300: #D1D5DB;
    --apple-gray-600: #4B5563;
    --apple-gray-800: #1F2937;
    --apple-gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.apple-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 40px;
}

.apple-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.apple-hero p {
    font-size: 1.5rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.apple-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--apple-gray-200);
}

.apple-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.apple-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--apple-gray-200);
}

.apple-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--apple-primary), var(--apple-secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.apple-card-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin: 0;
}

.apple-card-subtitle {
    color: var(--apple-gray-600);
    font-size: 0.95rem;
    margin: 4px 0 0 0;
}

.apple-button-primary {
    background: var(--apple-primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.apple-button-primary:hover {
    background: #0051D5;
    transform: scale(1.02);
}

.apple-button-primary:active {
    transform: scale(0.98);
}

.apple-button-secondary {
    background: var(--apple-gray-100);
    color: var(--apple-gray-900);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.apple-button-secondary:hover {
    background: var(--apple-gray-200);
}

.apple-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.apple-badge-primary {
    background: rgba(0, 122, 255, 0.1);
    color: var(--apple-primary);
}

.apple-badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--apple-success);
}

.apple-badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--apple-warning);
}

.apple-badge-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--apple-error);
}

.apple-grid {
    display: grid;
    gap: 24px;
}

.apple-grid-2 {
    grid-template-columns: repeat(1, 1fr);
}

.apple-grid-3 {
    grid-template-columns: repeat(1, 1fr);
}

.apple-grid-4 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .apple-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .apple-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .apple-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .apple-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .apple-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.apple-module-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--apple-gray-200);
}

.apple-module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.apple-module-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.apple-module-content {
    padding: 24px;
}

.apple-module-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin-bottom: 8px;
}

.apple-module-subtitle {
    font-size: 0.875rem;
    color: var(--apple-gray-600);
    margin-bottom: 12px;
}

.apple-module-description {
    font-size: 0.95rem;
    color: var(--apple-gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
}

.apple-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--apple-gray-200);
}

.apple-module-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--apple-gray-900);
}

.apple-module-price-original {
    font-size: 1rem;
    color: var(--apple-gray-600);
    text-decoration: line-through;
    margin-left: 8px;
}

.apple-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.apple-tag {
    background: var(--apple-gray-100);
    color: var(--apple-gray-600);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.apple-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apple-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--apple-gray-100);
}

.apple-feature-list li:last-child {
    border-bottom: none;
}

.apple-feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-center;
    color: var(--apple-success);
    flex-shrink: 0;
}

.apple-section {
    padding: 60px 0;
}

.apple-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--apple-gray-900);
    text-align: center;
    margin-bottom: 16px;
}

.apple-section-subtitle {
    font-size: 1.25rem;
    color: var(--apple-gray-600);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px auto;
}

.apple-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 48px;
    color: white;
    text-align: center;
}

.apple-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.apple-stat-item {
    padding: 20px;
}

.apple-stat-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.apple-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.apple-faq-item {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--apple-gray-200);
    transition: box-shadow 0.2s ease;
}

.apple-faq-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.apple-faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apple-faq-answer {
    color: var(--apple-gray-600);
    line-height: 1.7;
}

.apple-tree {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--apple-gray-200);
}

.apple-tree-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apple-tree-item:hover {
    background: var(--apple-gray-50);
}

.apple-tree-item.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--apple-primary);
    font-weight: 600;
}

.apple-tree-children {
    padding-left: 24px;
}

.apple-alert {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.apple-alert-info {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    color: var(--apple-primary);
}

.apple-alert-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
    color: var(--apple-success);
}

.apple-alert-warning {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.2);
    color: var(--apple-warning);
}

.apple-alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: var(--apple-error);
}

.apple-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--apple-gray-300);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.apple-input:focus {
    outline: none;
    border-color: var(--apple-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-center;
    padding: 20px;
    z-index: 50;
}

.apple-modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.apple-modal-header {
    display: flex;
    align-items: center;
    justify-between;
    margin-bottom: 24px;
}

.apple-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--apple-gray-900);
}

.apple-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--apple-gray-200);
    border-top-color: var(--apple-primary);
    border-radius: 50%;
    animation: apple-spin 0.8s linear infinite;
}

@keyframes apple-spin {
    to { transform: rotate(360deg); }
}

.apple-footer {
    background: var(--apple-gray-900);
    color: white;
    padding: 48px 20px;
    margin-top: 80px;
}

.apple-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.apple-footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.apple-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.apple-footer-links a:hover {
    color: white;
}

