/* ========================================
   雅韵堂 - 国风起名网站样式
   水墨画风格 · 传统配色 · 文化底蕴
   ======================================== */

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

/* ========================================
   基础设置
   ======================================== */

body {
    font-family: "KaiTi", "STKaiti", "华文楷体", "SimSun", "宋体", serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #dcdcdc 100%);
    color: #2c2c2c;
    min-height: 100vh;
    line-height: 1.8;
    overflow-x: hidden;
}

/* 宣纸纹理背景 */
.ink-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0,0,0,0.02) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0,0,0,0.02) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0.01) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   导航栏
   ======================================== */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background-image: url('assets/brand-logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.brand-seal {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

.brand-name {
    font-size: 28px;
    color: #1a1a1a;
    letter-spacing: 6px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #8B0000;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #8B0000;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ========================================
   主视觉区
   ======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('assets/banner-bg.png') center center/cover no-repeat;
    overflow: hidden;
}

/* 半透明遮罩层，保证文字可读 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* 墨韵装饰 */
.ink-decoration {
    position: absolute;
    width: 400px;
    height: 400px;
    opacity: 0.08;
    background: 
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.2) 0%, transparent 70%),
        radial-gradient(circle at 30% 30%, rgba(0, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 40%);
    animation: inkFloat 6s ease-in-out infinite alternate;
    pointer-events: none;
}

/* 墨韵飘动动画 */
@keyframes inkFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.06;
    }
    100% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.1;
    }
}

.ink-decoration.left {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.ink-decoration.right {
    bottom: 15%;
    right: 5%;
    animation-delay: 3s;
}

/* 添加更多墨韵装饰 */
.ink-decoration.extra-1 {
    top: 60%;
    left: 15%;
    width: 250px;
    height: 250px;
    opacity: 0.05;
    animation-delay: 2s;
}

.ink-decoration.extra-2 {
    top: 25%;
    right: 15%;
    width: 200px;
    height: 200px;
    opacity: 0.04;
    animation-delay: 4s;
}

/* 云纹装饰 */
.cloud-pattern {
    position: absolute;
    width: 150px;
    height: 80px;
    opacity: 0.1;
    background: 
        radial-gradient(ellipse 80% 40% at 20% 60%, rgba(0, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 30% at 50% 50%, rgba(0, 0, 0, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 40% 20% at 80% 40%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cloud-pattern.top-left {
    top: 8%;
    left: 3%;
    transform: rotate(-10deg);
}

.cloud-pattern.top-right {
    top: 5%;
    right: 8%;
    transform: rotate(10deg) scale(-1, 1);
}

.cloud-pattern.bottom-left {
    bottom: 8%;
    left: 6%;
    transform: rotate(5deg);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.hero-seal {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: bold;
    margin-bottom: 30px;
    box-shadow: 
        0 4px 15px rgba(139, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid #700000;
    position: relative;
}

/* 印章纹理效果 */
.hero-seal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 3px
        );
    border-radius: 2px;
    pointer-events: none;
}

.hero-title {
    font-size: 56px;
    color: #1a1a1a;
    margin-bottom: 20px;
    letter-spacing: 8px;
    line-height: 1.4;
    font-weight: bold;
    font-family: "STXingkai", "KaiTi", "楷体", "华文楷体", serif;
}

.hero-subtitle {
    font-size: 24px;
    color: #8B0000;
    margin-bottom: 15px;
    letter-spacing: 12px;
}

.hero-desc {
    font-size: 18px;
    color: #4a4a4a;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
}

.hero-btn {
    padding: 18px 50px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    letter-spacing: 4px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.hero-btn span {
    margin-right: 10px;
}

/* ========================================
   通用区块样式
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 15px;
    letter-spacing: 8px;
    position: relative;
    display: inline-block;
}

.section-title .title-deco {
    color: #8B0000;
    font-size: 28px;
    margin: 0 15px;
}

.section-desc {
    font-size: 18px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   雅韵起名区
   ======================================== */

.naming-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.naming-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* ========================================
   表单高级样式
   ======================================== */

/* 步骤指示器 */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 4px;
    transition: all 0.3s;
    opacity: 0.6;
}

.step-item.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1) 0%, rgba(165, 42, 42, 0.1) 100%);
}

.step-number {
    width: 36px;
    height: 36px;
    background: #ddd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

.step-label {
    font-size: 14px;
    color: #666;
}

.step-divider {
    width: 40px;
    height: 2px;
    background: #ddd;
    margin: 0 5px;
}

/* 表单步骤 */
.form-panel {
    padding: 30px;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

.form-step {
    display: none;
    animation: fadeSlideIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

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

.step-title {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    letter-spacing: 4px;
    font-weight: bold;
    text-align: center;
}

.required {
    color: #8B0000;
    margin-left: 4px;
}

/* 表单样式 */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #2c2c2c;
    font-weight: bold;
    letter-spacing: 2px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

input[type="text"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
    color: #2c2c2c;
    transition: all 0.3s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #8B0000;
    background: white;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.15);
}

input[type="text"]::placeholder,
input[type="date"]::placeholder,
textarea::placeholder {
    color: #bbb;
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* 性别选择 */
.gender-select {
    display: flex;
    gap: 15px;
}

.gender-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fafafa;
}

.gender-option:hover {
    border-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.1);
}

.gender-option input:checked + .gender-text,
.gender-option input:checked ~ .gender-text {
    color: #8B0000;
}

/* 选中时的整体样式 */
.gender-option:has(input:checked) {
    border-color: #8B0000;
    background: rgba(139, 0, 0, 0.05);
}

/* 选中时图标的颜色 */
.gender-option:has(input:checked) .gender-icon {
    filter: grayscale(0%);
}

.gender-option input {
    display: none;
}

.gender-icon {
    font-size: 24px;
}

.gender-text {
    font-size: 16px;
    font-weight: bold;
}

/* 名字长度选择 */
.name-length-select {
    display: flex;
    gap: 15px;
}

.length-option {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fafafa;
}

.length-option:hover {
    border-color: #8B0000;
    transform: translateY(-2px);
}

.length-option input:checked + .length-text {
    color: #8B0000;
}

/* 选中时的整体样式 */
.length-option:has(input:checked) {
    border-color: #8B0000;
    background: rgba(139, 0, 0, 0.05);
}

.length-option input {
    display: none;
}

.length-text {
    font-size: 15px;
    font-weight: bold;
}

/* 步骤按钮 */
.step-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.next-step-btn,
.prev-step-btn {
    flex: 1;
    padding: 14px 25px;
    border: 2px solid;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.next-step-btn {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-color: #8B0000;
}

.next-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.prev-step-btn {
    background: white;
    color: #666;
    border-color: #ddd;
}

.prev-step-btn:hover {
    border-color: #8B0000;
    color: #8B0000;
}

/* 生成按钮 */
.generate-btn {
    flex: 1;
    padding: 16px 30px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

/* 结果面板 */
.result-panel {
    background: white;
    padding: 35px 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    animation: fadeSlideIn 0.5s ease-out;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-seal {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

.result-header h3 {
    font-size: 24px;
    color: #1a1a1a;
    letter-spacing: 6px;
    margin: 0;
}

.refresh-btn {
    padding: 10px 20px;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    background: #A52A2A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

/* 结果摘要 */
.result-summary {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #8B0000;
}

.result-summary p {
    margin: 8px 0;
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.8;
}

.result-summary strong {
    color: #8B0000;
    font-weight: bold;
}

/* 返回按钮 */
.back-btn {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    background: white;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 2px;
}

.back-btn:hover {
    border-color: #8B0000;
    color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 结果列表 */
.result-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.name-card {
    background: white;
    padding: 20px;
    border-radius: 4px;
    border-left: 3px solid #8B0000;
    transition: all 0.3s;
}

.name-card:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.name-card h3 {
    font-size: 28px;
    color: #8B0000;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 4px;
}

.name-card .source {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    font-style: italic;
}

.name-card .meaning {
    color: #2c2c2c;
    font-size: 15px;
    line-height: 1.8;
}

.name-card .meaning-section {
    margin: 12px 0;
    padding: 12px;
    background: rgba(139, 0, 0, 0.03);
    border-radius: 4px;
}

.name-card .char-meanings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.name-card .char-meaning {
    display: flex;
    align-items: center;
    gap: 10px;
}

.name-card .char-highlight {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #8B0000;
    font-family: "SimSun", "宋体", serif;
    padding: 8px 12px;
    background: rgba(139, 0, 0, 0.08);
    border-radius: 4px;
    letter-spacing: 2px;
}

.name-card .char-meaning-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.9;
    color: #4a4a4a;
}

.name-card .poem-line {
    margin-top: 10px;
    padding: 10px;
    background: rgba(139, 0, 0, 0.05);
    border-radius: 4px;
    color: #4a4a4a;
    font-size: 14px;
}

/* ========================================
   雅韵之道
   ======================================== */

.philosophy-section {
    background: url('assets/banner-bg.png') center center/cover no-repeat;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    position: relative;
}

.philosophy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.philosophy-card {
    text-align: center;
    padding: 30px 20px;
    background: #fafafa;
    border-radius: 4px;
    transition: all 0.3s;
}

.philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.philosophy-card h3 {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.philosophy-card p {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.8;
}

/* ========================================
   姓氏文化
   ======================================== */

.culture-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.culture-intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: #fafafa;
    border-radius: 4px;
}

.culture-text {
    font-size: 18px;
    color: #8B0000;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.culture-desc {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.8;
}

.surname-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.surname-card {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 4px;
    transition: all 0.3s;
}

.surname-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.surname-char {
    display: block;
    font-size: 48px;
    color: #8B0000;
    margin-bottom: 10px;
    font-weight: bold;
}

.surname-meaning {
    font-size: 14px;
    color: #666;
}

/* ========================================
   起名典故
   ======================================== */

.stories-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.story-card {
    padding: 30px;
    background: #fafafa;
    border-radius: 4px;
    border-left: 3px solid #8B0000;
    transition: all 0.3s;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.story-card h3 {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.story-card p {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.8;
    margin-bottom: 15px;
}

.story-source {
    display: block;
    font-size: 14px;
    color: #8B0000;
    font-style: italic;
}

/* ========================================
   每日一诗
   ======================================== */

.poem-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.poem-display {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 4px;
    border: 1px solid #ddd;
}

.poem-title {
    font-size: 28px;
    color: #8B0000;
    margin-bottom: 25px;
    letter-spacing: 8px;
}

.poem-body {
    font-size: 18px;
    line-height: 2.2;
    color: #2c2c2c;
    margin-bottom: 20px;
}

.poem-body p {
    margin-bottom: 10px;
}

.poem-author {
    font-size: 16px;
    color: #666;
    font-style: italic;
}

/* ========================================
   专业服务
   ======================================== */

.services-section {
    background: url('assets/banner-bg.png') center center/cover no-repeat;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.service-item {
    text-align: center;
    padding: 35px 25px;
    background: #fafafa;
    border-radius: 4px;
    transition: all 0.3s;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.service-item h3 {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.service-item p {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.8;
}

/* ========================================
   页脚
   ======================================== */

.main-footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 30px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    padding-bottom: 40px;
}

.footer-brand {
    text-align: center;
}

.footer-seal {
    width: 70px;
    height: 70px;
    background-image: url('assets/brand-logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    color: #d4a574;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #d4a574;
}

.footer-contact p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0;
    line-height: 1.6;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .nav-content {
        padding: 12px 20px;
    }

    .brand-name {
        font-size: 24px;
        letter-spacing: 4px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 14px;
    }

    .hero-title {
        font-size: 42px;
        letter-spacing: 6px;
    }

    .hero-subtitle {
        font-size: 20px;
        letter-spacing: 8px;
    }

    .naming-content {
        grid-template-columns: 1fr;
    }

    section {
        padding: 50px 15px;
    }

    .section-title {
        font-size: 28px;
        letter-spacing: 6px;
    }

    .philosophy-grid,
    .surname-examples,
    .stories-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* 表单优化 */
    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 15px;
    }

    input[type="text"],
    input[type="date"],
    textarea,
    select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .gender-option {
        padding: 12px 10px;
    }

    .gender-icon {
        font-size: 24px;
    }

    .gender-text {
        font-size: 14px;
    }

    /* 按钮优化 */
    .hero-btn {
        padding: 16px 40px;
        font-size: 18px;
    }

    .generate-btn,
    .prev-step-btn,
    .next-step-btn,
    .refresh-btn,
    .back-btn {
        padding: 14px 30px;
        font-size: 16px;
    }

    /* 结果面板优化 */
    .result-panel {
        padding: 30px 20px;
    }

    .name-card {
        padding: 20px 16px;
    }

    .name-card h3 {
        font-size: 24px;
    }

    .name-card .source {
        font-size: 13px;
    }

    .name-card .meaning {
        font-size: 14px;
    }

    /* 步骤指示器优化 */
    .step-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 18px;
        letter-spacing: 6px;
    }

    .hero-btn {
        padding: 14px 30px;
        font-size: 16px;
    }

    /* 导航优化 */
    .nav-content {
        padding: 10px 15px;
    }

    .brand-name {
        font-size: 20px;
        letter-spacing: 3px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 12px;
    }

    /* 通用优化 */
    section {
        padding: 40px 12px;
    }

    .section-title {
        font-size: 24px;
        letter-spacing: 4px;
    }

    .section-desc {
        font-size: 14px;
    }

    /* 表单优化 */
    .form-panel {
        padding: 25px 18px;
    }

    .form-step {
        padding: 15px 12px;
    }

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

    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-hint {
        font-size: 11px;
    }

    input[type="text"],
    input[type="date"],
    textarea,
    select {
        padding: 11px 12px;
        font-size: 14px;
    }

    .gender-select {
        gap: 10px;
    }

    .gender-option {
        padding: 10px 8px;
    }

    .gender-icon {
        font-size: 22px;
    }

    .gender-text {
        font-size: 13px;
    }

    /* 按钮优化 */
    .hero-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .generate-btn,
    .prev-step-btn,
    .next-step-btn,
    .refresh-btn,
    .back-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .step-buttons {
        gap: 12px;
        margin-top: 20px;
    }

    /* 结果面板优化 */
    .result-panel {
        padding: 25px 15px;
    }

    .result-header {
        margin-bottom: 20px;
    }

    .result-title h3 {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .name-card {
        padding: 18px 14px;
        margin-bottom: 16px;
    }

    .name-card h3 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .name-card .source {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .name-card .meaning-section {
        margin: 10px 0;
        padding: 10px;
    }

    .name-card .meaning {
        font-size: 13px;
        line-height: 1.7;
    }

    .name-card .char-meaning-text {
        font-size: 13px;
    }

    .name-card .poem-line {
        font-size: 13px;
        line-height: 1.7;
    }

    /* 步骤指示器优化 */
    .progress-indicator {
        margin-bottom: 15px;
        padding: 12px;
    }

    .step-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* 卡片优化 */
    .philosophy-card,
    .surname-card,
    .story-card,
    .service-card {
        padding: 20px 16px;
    }

    .card-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .philosophy-card h3,
    .surname-card h3,
    .story-card h3,
    .service-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .philosophy-card p,
    .surname-card p,
    .story-card p,
    .service-card p {
        font-size: 13px;
        line-height: 1.7;
    }

    /* 页脚优化 */
    .footer-content {
        padding: 30px 15px;
    }

    .footer-links a {
        font-size: 13px;
        padding: 6px 0;
    }

    .footer-contact p {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 15px;
        font-size: 12px;
    }
}

/* 加载提示样式 */
.loading-message {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #8b0000;
}

.loading-spinner {
    margin-top: 20px;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 0, 0, 0.1);
    border-top: 4px solid #8b0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   大屏幕优化 (1200px+)
   ======================================== */

@media (min-width: 1200px) {
    .naming-content {
        gap: 40px;
    }

    .philosophy-grid,
    .surname-examples,
    .stories-grid,
    .services-grid {
        gap: 30px;
    }

    .hero-title {
        font-size: 58px;
    }

    .hero-subtitle {
        font-size: 24px;
    }
}

/* ========================================
   响应式图片优化
   ======================================== */

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   触摸优化
   ======================================== */

.hero-btn,
.generate-btn,
.prev-step-btn,
.next-step-btn,
.refresh-btn,
.back-btn {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

/* ========================================
   文本选择优化
   ======================================== */

.user-select-none {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ========================================
   平滑滚动优化
   ======================================== */

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   防止文本溢出
   ======================================== */

* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   移动端安全区域适配
   ======================================== */

@supports (padding: max(0px)) {
    .nav-content {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    section {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}
