/* 爸妈帮相亲·社区红娘Claw - 统一样式文件 */

/* 基础样式 */
:root {
    --primary-red: #C41E3A;
    --primary-gold: #D4AF37;
    --primary-blue: #1A365D;
    --primary-color: #C41E3A;
    --primary-hover: #A01830;
    --secondary-color: #1A365D;
    --text-color: #2D3748;
    --text-muted: #718096;
    --bg-color: #FFF8F0;
    --bg-gradient: linear-gradient(135deg, #FFF8F0 0%, #FFE4E1 50%, #FFF0F5 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --shadow: 0 4px 15px rgba(196, 30, 58, 0.08);
    --shadow-hover: 0 8px 25px rgba(196, 30, 58, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--bg-gradient);
    min-height: 100vh;
}

/* 响应式容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 响应式网格 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, 
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, 
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, 
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    position: relative;
    padding: 0 15px;
    margin-bottom: 15px;
}

/* 列样式 */
.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333333%; }
.col-3 { width: 25%; }
.col-8 { width: 66.666667%; }

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary-red);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #A01830 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #A01830 0%, #8B1528 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0D2137 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #0D2137 0%, #061224 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8E0D8;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #FFFAF5;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
    background: #FFFFFF;
}

.form-control.is-invalid {
    border-color: var(--primary-red);
}

.invalid-feedback {
    color: var(--primary-red);
    font-size: 0.875rem;
    margin-top: 5px;
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%23CD5C5C" stroke-width="4"><animate attributeName="stroke-dasharray" values="0,125;125,125" dur="1s" repeatCount="indefinite"/></circle></svg>') center no-repeat;
    background-size: 40px;
    z-index: 10;
}

/* 提示消息 */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* 模态框 - 仅针对非Bootstrap模态框 */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.custom-modal.active {
    display: flex;
}

.custom-modal .modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.custom-modal .modal-close:hover {
    color: #333;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination .page-item {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.pagination .page-item:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }

/* 响应式显示 */
@media (max-width: 768px) {
    .col-md-12 { width: 100%; }
    .col-md-6 { width: 50%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-3 { width: 25%; }
    
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }
    
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .col-12, .col-sm-12 { width: 100%; }
    .col-6, .col-sm-6 { width: 100%; }
    .col-4, .col-sm-4 { width: 100%; }
    .col-3, .col-sm-3 { width: 100%; }
    
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* 选择框样式优化 */
select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 8L1 3h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* 复选框和单选框样式 */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 12px;
    font-weight: normal;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* 头像样式 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.avatar-sm {
    width: 30px;
    height: 30px;
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

/* 导航菜单 */
.navbar {
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 0;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    display: inline-block;
    transition: var(--transition);
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* 页脚 */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

/* 马牌样式 */
.horse-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.match-time {
    font-size: 0.85rem;
    color: #666;
}

.match-score {
    font-weight: bold;
    color: #e74c3c;
}

.btn-detail {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 15px;
}

.btn-compatibility {
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 15px;
}

.btn-compatibility.primary {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-compatibility.danger {
    background-color: #CD5C5C;
    border-color: #CD5C5C;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    margin: 40px 0;
}

.btn-play {
    margin-top: 20px;
    font-size: 1.1rem;
    padding: 12px 24px;
}

/* 模态框样式 */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.modal-header h3 {
    color: #667eea;
    font-weight: bold;
    margin: 0;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.score-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.score-circle span {
    font-size: 3em;
    font-weight: bold;
    color: white;
}

/* 加载模态框 */
.loading-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

/* 命盘样式 */
.scroll-container {
    background-color: #f9f3e9;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scroll-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #8B4513;
}

.scroll-header h1 {
    color: #8B4513;
    font-weight: bold;
    margin-bottom: 15px;
}

.scroll-header p {
    margin: 5px 0;
}

.scroll-header .fate-code {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B4513;
}

.info-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-section h2 {
    color: #8B4513;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.info-section h3 {
    color: #555;
    font-weight: bold;
    margin: 15px 0 10px 0;
}

.info-item {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
}

.info-item label {
    font-weight: bold;
    min-width: 100px;
    color: #555;
}

.info-item value {
    flex: 1;
}

.info-item .highlight {
    font-weight: bold;
    color: #8B4513;
}

.info-section ul {
    list-style-type: none;
    padding: 0;
}

.info-section ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.info-section ul li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #8B4513;
    font-weight: bold;
}

.info-section .alert-box {
    background-color: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.info-section .alert-box p {
    font-weight: bold;
    color: #8B4513;
    margin: 0;
}

.info-section .quote-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #d63384;
    margin: 15px 0;
}

.info-section .quote-box p {
    line-height: 1.6;
    font-size: 1.1rem;
    margin: 0;
}

.info-section .year-card {
    background-color: #fefefe;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.info-section .year-card h4 {
    color: #d63384;
    margin-bottom: 10px;
}

.info-section .year-card p {
    line-height: 1.6;
    margin: 5px 0;
}

.info-section .year-card .luck-score {
    font-weight: bold;
    color: #8B4513;
    margin-top: 10px;
}

.info-section .conclusion {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #d63384;
    margin: 15px 0;
}

.info-section .conclusion p {
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
}

/* 社交互动 */
.social-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.social-section h2 {
    color: #8B4513;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .scroll-container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .info-section {
        padding: 15px;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item label {
        margin-bottom: 5px;
    }
}

/* 游戏页面样式 */
.game-container {
    text-align: center;
    padding: 30px 0;
}

.stamina-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stamina-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.stamina-label {
    font-weight: bold;
    color: #555;
}

.stamina-value {
    font-weight: bold;
    color: var(--primary-color);
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-whistle {
    font-size: 1.2rem;
    padding: 12px 24px;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-shop {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-stable {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333;
}

.game-message {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-message h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.horse-card {
    background-color: #f9f3e9;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #DAA520;
}

.horse-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #DAA520;
}

.horse-card-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B4513;
}

.horse-card-grade {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.horse-card-grade.S {
    background-color: #ffd700;
    color: #333;
}

.horse-card-grade.A {
    background-color: #c0c0c0;
    color: #333;
}

.horse-card-grade.B {
    background-color: #cd7f32;
    color: white;
}

.horse-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.horse-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.horse-card-item-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.horse-card-item-value {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.horse-card-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #DAA520;
}

.horse-card-footer .horse-card-item {
    text-align: left;
    grid-column: span 2;
}

.horse-card-footer .horse-card-item-value {
    font-size: 0.9rem;
}

.horse-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: center;
}

.horse-card-tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    background-color: #f0f0f0;
    color: #333;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
/* 编辑马牌通知 */
.edit-card-notice {
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.edit-card-notice small {
    color: #856404;
}

/* 子详情页面样式 */
.detail-container {
    padding: 30px 0;
}

.detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.detail-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.detail-header p {
    color: #666;
    font-size: 1.1rem;
}

.station-info {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.station-info img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.station-info h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* 日期卡片 */
.date-card.center {
    text-align: center;
    padding: 40px;
}

.date-card.center p {
    color: #999;
    font-size: 1.1em;
}

.date-card.center p + p {
    color: #ccc;
    margin-top: 10px;
}

/* 段落间距 */
.mt-4 {
    margin-top: 15px;
}

