/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --border-color: #D2D2D7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    padding: 0;
    margin: 0;
}

/* 头部样式 */
header {
    background: #333333;
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* 主内容区域 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 顶部区域 - 账号介绍和图片 */
.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.account-intro {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.account-intro h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.account-intro p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.account-image {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.account-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* 苹果ID分享区域 */
.sharing-section {
    margin-bottom: 3rem;
}

.sharing-section h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.update-date {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.account-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.account-number {
    background: #333333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-label {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.account-value {
    font-family: 'Courier New', monospace;
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    word-break: break-all;
    color: var(--text-primary);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    margin: 0;
    flex: 1;
}

.reveal-btn,
.copy-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.reveal-btn {
    background: var(--primary-color);
    color: white;
}

.reveal-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.02);
}

.copy-btn {
    background: var(--success-color);
    color: white;
}

.copy-btn:hover {
    background: #30B04F;
    transform: scale(1.02);
}

.copy-btn:active {
    transform: scale(0.98);
}

/* 独享ID购买区域 */
.purchase-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.purchase-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.purchase-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.purchase-content > p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.purchase-benefits {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.purchase-benefits li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
}

.purchase-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.purchase-button-container {
    text-align: center;
    margin-top: 2rem;
}

.purchase-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.purchase-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.purchase-btn:active {
    transform: translateY(0);
}

/* 使用说明区域 */
.instructions-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.instructions-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.instructions-list {
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.instructions-list li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.instructions-list li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.instructions-illustration {
    margin-top: 1.5rem;
    text-align: center;
}

.instructions-illustration img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
    object-fit: contain;
}

/* 注意事项区域 */
.precautions-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.precautions-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.precautions-list {
    list-style: none;
    padding-left: 0;
}

.precautions-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.8;
    color: var(--text-primary);
}

.precautions-list li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.precautions-list li strong {
    color: var(--warning-color);
}

/* 页脚 */
footer {
    background: #333333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* 友情链接：标题和链接同一行 */
.friend-links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto; /* 小屏不够时允许横向滚动 */
    -webkit-overflow-scrolling: touch;
}

.friend-links-row h3 {
    margin: 0;
    font-size: inherit; /* 与 footer 其他文字保持一致 */
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.friend-links-list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem 0.5rem; /* 进一步减小友情链接之间间距 */
}

.friend-links-list a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: none; /* 去掉外边框 */
    border-radius: 8px;
    flex-shrink: 0;
}

.friend-links-list a:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .top-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .accounts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    .account-intro,
    .instructions-section,
    .precautions-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.25rem;
    }

    .sharing-section h2,
    .instructions-section h2,
    .precautions-section h2 {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-card {
    animation: fadeIn 0.5s ease-out;
}

.account-card:nth-child(1) { animation-delay: 0.1s; }
.account-card:nth-child(2) { animation-delay: 0.2s; }
.account-card:nth-child(3) { animation-delay: 0.3s; }
.account-card:nth-child(4) { animation-delay: 0.4s; }
.account-card:nth-child(5) { animation-delay: 0.5s; }
.account-card:nth-child(6) { animation-delay: 0.6s; }

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}