/* 姓名测试 - 共用样式表 */
/* 现代中国风设计 - 优雅、简洁、专业 */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gold-gradient: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --shadow-hover: 0 12px 40px rgba(102, 126, 234, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 0 !important;
    min-height: 100vh;
}

/* 装饰性背景图案 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container.main_ {
    position: relative;
    z-index: 1;
}

/* 主容器样式 */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题样式 */
.title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.title_link {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
}

.title_link:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    text-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.title_link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    transition: width 0.3s ease;
}

.title_link:hover::after {
    width: 100%;
}

/* 卡片容器 */
.card-container {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 输入表单样式 */
.form-section {
    padding: 40px 30px;
    background: linear-gradient(to bottom, #ffffff, #f7fafc);
}

/* 表单容器 */
.fortune-form-wrapper {
    max-width: 100%;
}

/* 输入组容器 */
.form-input-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* 输入字段组 */
.form-field-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease;
}

.form-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #5b21b6;
    padding-left: 4px;
}

.form-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-field-icon {
    position: absolute;
    left: 16px;
    color: #667eea;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.form-field-input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.form-field-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

.form-field-input::placeholder {
    color: #a0aec0;
}

/* 提交按钮 */
.form-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.form-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.form-submit-btn:hover::before {
    left: 100%;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.form-submit-btn .btn-icon {
    margin-right: 8px;
    font-size: 20px;
}

/* 兼容旧版input-group（如果还有使用的地方） */
.input-group {
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.input-group-addon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-weight: 500;
    padding: 12px 20px;
    font-size: 16px;
}

.input-group .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    transition: background 0.2s ease;
}

.input-group .form-control:focus {
    background: #f7fafc;
    box-shadow: none;
    outline: none;
}

.btn-primary.input-group-addon {
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary.input-group-addon:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: scale(1.02);
}

/* 信息提示框 */
.alert-info {
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    border: 2px solid #c7d2fe;
    border-radius: 12px;
    padding: 24px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.6s ease 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-info strong {
    color: #5b21b6;
    font-weight: 600;
}

.alert-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.alert-info a:hover {
    color: #764ba2;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-default {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-default:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Well 容器 */
.well {
    background: #f7fafc;
    border: none;
    border-radius: 12px;
    padding: 24px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    margin: 20px 0;
}

.well strong {
    color: #667eea;
    font-weight: 600;
}

/* 结果展示 */
.jumbotron {
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    padding: 30px !important;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s ease 0.3s both;
}

.jumbotron h4 {
    font-size: 1.2rem;
    line-height: 1.8;
    font-weight: 400;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 选项卡 */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.nav-tabs > li > a {
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 4px;
}

.nav-tabs > li > a:hover {
    background: #f7fafc;
    color: #667eea;
    border: none;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-weight: 600;
}

.tab-content {
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

/* 面板样式 */
.panel {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.panel-heading {
    background: linear-gradient(135deg, #f7fafc, #e2e8f0);
    border-bottom: 2px solid #cbd5e0;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-heading strong {
    color: #667eea;
    font-size: 1.1rem;
}

.panel-body {
    padding: 20px;
}

.panel-body strong {
    color: #5b21b6;
    display: block;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.panel-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    color: var(--text-secondary);
    margin: 10px 0;
    font-style: italic;
}

/* 投票按钮 */
.btn-lg {
    padding: 20px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
}

.btn-lg .glyphicon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.btn-lg:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

#up_btn {
    background: var(--success-gradient);
    border: none;
    color: white;
}

#down_btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--text-secondary);
}

#down_btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* Pre 代码块 */
pre {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14pt !important;
    line-height: 1.8;
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .card-container {
        border-radius: 16px;
    }
    
    .btn-lg {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    .main-container {
        padding: 20px 15px;
    }
    
    /* 移动端表单优化 - 姓名分两行 */
    .form-input-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-submit-btn {
        padding: 18px 32px;
        font-size: 17px;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 成功分数显示 */
.score-display {
    display: inline-block;
    background: linear-gradient(135deg, #ffd89b, #19547b);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
    margin: 0 8px;
}

/* 改进的链接样式 */
a {
    color: #667eea;
    transition: color 0.2s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* 页脚免责声明 */
.disclaimer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
    font-size: 1.3rem;
    color: var(--text-secondary);
    text-align: center;
    animation: fadeIn 0.6s ease 0.5s both;
}

/* 页脚 */
.footer {
	text-align: center;
	padding: 20px 0;
	color: #ccc;
	font-size: 0.9em;
	border-top: 1px solid #eee;
	margin-top: 58px;
}

.footer a {
	color: #ccc;
}

/* 修正Bootstrap一些老的样式问题 */
.input-group-addon {
	border: 0;
	border-radius: 0 50px 50px 0;
}