/* 共享样式 - Army Chess Judge */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: url('../images/launch-background.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* 页面特定背景 */
body.bg-rules {
    background-image: url('../images/rules.png');
}

body.bg-usage {
    background-image: url('../images/usage.png');
}

body.bg-privacy {
    background-image: url('../images/privacy.png');
}

/* Banner 样式 */
.site-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    overflow: visible;
}

.banner-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: max-content;
}

.banner-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.banner-icon {
    width: 36px;
    height: 36px;
    background: url('../images/app-icon.png') no-repeat center center;
    background-size: cover;
    border-radius: 8px;
}

.banner-title {
    font-size: 1.2em;
    font-weight: bold;
    white-space: nowrap;
}

.banner-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.banner-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.3s;
    opacity: 0.85;
    white-space: nowrap;
}

.banner-nav a:hover {
    background: rgba(255,255,255,0.15);
    opacity: 1;
}

.banner-nav a.active {
    background: rgba(52, 152, 219, 0.5);
    opacity: 1;
}

.nav-divider {
    color: rgba(255,255,255,0.3);
    margin: 0 5px;
}

.lang-dropdown {
    position: relative;
}

.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
}

.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    min-width: 150px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1001;
}

.lang-menu.show {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.lang-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.lang-menu a.active {
    background: rgba(52, 152, 219, 0.4);
}

/* 主内容区域 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* 标题与按钮并排 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

.card-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.appstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}

.appstore-btn:hover {
    background: #333;
    transform: scale(1.02);
}

.appstore-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

h3 {
    color: #34495e;
    margin: 20px 0 10px;
}

/* 列表样式 */
ul {
    list-style: none;
    padding: 0;
}

ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

ul li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 10px;
}

/* 步骤列表 */
ol.steps {
    padding-left: 20px;
    counter-reset: step-counter;
    list-style: none;
}

ol.steps li {
    padding: 10px 0 10px 35px;
    position: relative;
    counter-increment: step-counter;
}

ol.steps li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 10px;
    width: 24px;
    height: 24px;
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.85em;
    font-weight: bold;
}

/* 按钮样式 */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.cta-button.secondary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.cta-button.secondary:hover {
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.button-group {
    text-align: center;
    margin: 30px 0;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px;
    color: rgba(255,255,255,0.7);
}

/* 高亮样式 */
.highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
}

.warning {
    color: #c0392b;
    font-weight: bold;
}

.success {
    color: #27ae60;
    font-weight: bold;
}

.section {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

th {
    background-color: #3498db;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* 主页头部 */
.page-header {
    text-align: center;
    padding: 40px 0;
}

.page-header h1 {
    color: #f5d67b;
    text-shadow:
        0 0 10px rgba(0,0,0,0.8),
        0 0 20px rgba(0,0,0,0.6),
        0 2px 4px rgba(0,0,0,0.9),
        0 0 40px rgba(245,214,123,0.3);
    letter-spacing: 2px;
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: url('../images/app-icon.png') no-repeat center center;
    background-size: cover;
    margin: 0 auto 20px;
    box-shadow:
        0 0 0 4px rgba(245,214,123,0.4),
        0 0 20px 10px rgba(245,214,123,0.5),
        0 0 40px 20px rgba(245,214,123,0.25),
        0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid rgba(245,214,123,0.6);
}

.tagline {
    font-size: 1.2em;
    color: #e8d9a0;
    text-shadow:
        0 0 8px rgba(0,0,0,0.9),
        0 0 16px rgba(0,0,0,0.7),
        0 1px 3px rgba(0,0,0,0.9);
    letter-spacing: 1px;
}

/* 按钮说明样式 */
.button-guide {
    margin-top: 20px;
}

.button-item {
    display: flex;
    align-items: flex-start;
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    gap: 15px;
}

.button-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    border-radius: 8px;
    color: #fff;
}

.button-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.button-icon.large {
    width: 80px;
    height: 80px;
    background: none;
}

.button-icon.large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.button-desc {
    flex: 1;
}

.button-desc strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

.button-desc p {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

/* 响应式 */
@media (max-width: 768px) {
    .banner-container {
        padding: 8px 10px;
        gap: 8px;
    }

    .banner-icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }

    .banner-title {
        font-size: 0.95em;
    }

    .banner-nav {
        gap: 2px;
    }

    .banner-nav a {
        padding: 6px 8px;
        font-size: 0.75em;
    }

    .nav-divider {
        margin: 0 2px;
        font-size: 0.7em;
    }

    .lang-btn {
        padding: 6px 8px;
        font-size: 0.75em;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .banner-container {
        padding: 6px 8px;
        gap: 6px;
    }

    .banner-brand {
        gap: 6px;
    }

    .banner-icon {
        width: 24px;
        height: 24px;
        border-radius: 5px;
    }

    .banner-title {
        font-size: 0.85em;
    }

    .banner-nav a {
        padding: 5px 6px;
        font-size: 0.7em;
    }

    .nav-divider {
        display: none;
    }

    .lang-btn {
        padding: 5px 6px;
        font-size: 0.7em;
    }

    .lang-menu {
        right: 0;
        min-width: 120px;
    }

    .lang-menu a {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

/* 反馈表单样式 */
.feedback-form {
    margin-top: 20px;
    position: relative;
}

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

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

.form-group .required {
    color: #c0392b;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.char-count {
    font-size: 0.85em;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.char-count.over-limit {
    color: #c0392b;
    font-weight: bold;
}

/* 提示消息样式 */
.feedback-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

/* 表单按钮样式 */
.feedback-form .cta-button {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
}

.feedback-form .cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
