/* 蓝夜何切300 - 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 头部导航 */
header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: #bbdefb;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.2);
}

/* 移动端菜单 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 主要内容区 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 160px);
}

/* 页面标题 */
.page-header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header h1 {
    font-size: 32px;
    color: #1a237e;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    color: #666;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h2 {
    color: #1a237e;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 10px;
}

.card h3 {
    color: #283593;
    margin: 20px 0 10px;
    font-size: 18px;
}

.card p {
    margin-bottom: 15px;
    color: #555;
}

.card ul, .card ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.card li {
    margin-bottom: 8px;
    color: #555;
}

/* 首页特色区域 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-box h3 {
    color: #1a237e;
    margin-bottom: 10px;
}

.feature-box p {
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #1976D2;
}

.btn-large {
    font-size: 18px;
    padding: 15px 40px;
}

/* 开始练习区域 */
.cta-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    margin: 30px 0;
}

.cta-section h2 {
    color: #1a237e;
    font-size: 28px;
    margin-bottom: 15px;
}

.cta-section p {
    color: #555;
    font-size: 18px;
    margin-bottom: 25px;
}

/* 页脚 */
footer {
    background: #1a237e;
    color: white;
    padding: 40px 20px 20px;
}

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

.footer-section h4 {
    margin-bottom: 15px;
    color: #bbdefb;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
}

/* AdSense 广告位占位 */
.ad-container {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 4px;
    color: #999;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 10px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #2196F3;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
    margin: 0 5px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #1a237e;
        padding: 20px;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }
}

/* 麻将题库特殊样式 */
.question-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.situation {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    font-weight: normal;
    word-break: break-all;
}

.dora-indicator {
    display: flex;
    gap: 0;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 10px;
    margin-top: 10px;
}

.dora-tile {
    width: 20px;
    height: 28px;
}

.tile-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.tile-row {
    display: flex;
    gap: 2px;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
}

.tile {
    width: 30px;
    height: 42px;
}

.drawn-tile {
    margin-left: 15px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    transition: all 0.2s;
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    padding-left: 15px;
    box-sizing: border-box;
    font-size: 12px;
}

.option-item:hover {
    border-color: #2196F3;
}

.option-tile {
    width: 25px;
    height: 35px;
}

.option-identifier {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
    font-weight: bold;
    display: none;
}

.option-item.correct {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.option-item.incorrect {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.answer-section {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    flex-direction: row;
    gap: 20px;
}

.answer-column {
    flex: 1;
}

.explanation-column {
    flex: 3;
}

.answer {
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 8px;
    font-size: 14px;
}

.answer-tile {
    width: 30px;
    height: 42px;
    margin: 0 3px;
}

.answer-tiles-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.explanation {
    color: #666;
    line-height: 1.4;
    font-size: 13px;
}

.explanation-title {
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 8px;
    font-size: 14px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.nav-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    flex: 1;
}

.nav-btn:hover {
    background-color: #0b7dda;
}

.nav-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.question-info {
    text-align: left;
    margin-bottom: 10px;
    font-weight: normal;
    color: #333;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    position: relative;
}

.question-number {
    font-size: 16px;
    margin-bottom: 0;
}

.question-category {
    font-size: 16px;
    color: #333;
}

.question-selector {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.question-selector select {
    padding: 3px 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.question-selector button {
    padding: 3px 8px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.question-selector button:hover {
    background-color: #0b7dda;
}

@media (min-width: 768px) {
    .tile {
        width: 40px;
        height: 56px;
    }
    .dora-tile {
        width: 25px;
        height: 35px;
    }
    .answer-tile {
        width: 40px;
        height: 56px;
    }
    .option-tile {
        width: 30px;
        height: 42px;
    }
    .situation {
        font-size: 16px;
    }
    .explanation {
        font-size: 14px;
    }
}
