/* 上润易和在线排盘系统 - 统一样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimSun", "宋体", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 链接样式 */
a:link {
    text-decoration: none;
    color: #0066cc;
}

a:visited {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    text-decoration: none;
    color: #ff6600;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航头部 */
.nav-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-header h3 {
    text-align: center;
    font-size: 18px;
    font-weight: normal;
}

.nav-header a {
    color: white;
    margin: 0 10px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-header a:hover {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

.nav-active {
    background-color: rgba(255,255,255,0.2) !important;
    font-weight: bold;
}

/* 内容区域 */
.content-wrapper {
    background: white;
    margin: 20px 0;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

select.form-control {
    background-color: white;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-large {
    font-size: 16px;
    padding: 12px 30px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* 排盘文本样式 */
.paipan-text {
    line-height: 1.8;
    font-size: 14px;
    color: #333;
}

.paipan-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.paipan-text li {
    margin-bottom: 10px;
}

/* 重要提示样式 */
.important-note {
    color: #dc3545;
    font-weight: bold;
}

/* 移动端提示样式 */
.mobile-note {
    color: #0066cc;
    font-weight: 500;
}

/* 文本对齐 */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* 表格样式优化 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

/* 排盘结果显示 */
.paipan-result {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .content-wrapper {
        padding: 20px;
        margin: 10px 0;
    }
    
    .nav-header h3 {
        font-size: 16px;
    }
    
    .nav-header a {
        margin: 0 5px;
        padding: 3px 8px;
    }
    
    .btn-large {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .nav-header h3 {
        font-size: 14px;
    }
    
    .nav-header a {
        display: block;
        margin: 5px 0;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .paipan-result {
        font-size: 11px;
        padding: 15px;
    }
}

/* 特殊元素样式 */
.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* 打印样式 */
@media print {
    .nav-header {
        display: none;
    }
    
    .content-wrapper {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .btn {
        display: none;
    }
}