/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    padding: 20px 0;
    position: relative;
    overflow-x: hidden;
}

/* 装饰元素 */
.decoration-top,
.decoration-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: -1;
    opacity: 0.1;
}

.decoration-top {
    top: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%232c3e50" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,224C672,213,768,171,864,149.3C960,128,1056,128,1152,149.3C1248,171,1344,213,1392,234.7L1440,256L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z"></path></svg>') no-repeat center;
    background-size: cover;
}

.decoration-bottom {
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%232c3e50" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,224C672,213,768,171,864,149.3C960,128,1056,128,1152,149.3C1248,171,1344,213,1392,234.7L1440,256L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat center;
    background-size: cover;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.header-icon {
    font-size: 3em;
    color: #3498db;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 600;
}

.description {
    color: #666;
    line-height: 1.8;
    padding: 0 20px;
}

/* 问题块样式 */
.question-block {
    background-color: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2980b9);
}

.question-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.question-block h2 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-block h2 i {
    color: #3498db;
    font-size: 1.2em;
}

/* 选项样式 */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .8), transparent 70%);
    transform: translateX(-100%);
}

.option:hover::after {
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.option:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.option input[type="radio"],
.option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 文本输入样式 */
.text-input {
    margin-top: 10px;
}

.text-input input[type="text"],
.text-input textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    color: #2c3e50;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    font-family: inherit;
}

.text-input input[type="text"]:focus,
.text-input textarea:focus {
    outline: none;
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.text-input input[type="text"]::placeholder,
.text-input textarea::placeholder {
    color: #95a5a6;
}

/* 提交按钮样式 */
.submit-block {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(52,152,219,0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52,152,219,0.3);
    background: linear-gradient(135deg, #2980b9 0%, #2472a4 100%);
}

/* 结果显示样式 */
.results {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.results h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.result-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-item p {
    color: #34495e;
    line-height: 1.6;
}

.reset-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(231,76,60,0.2);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231,76,60,0.3);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* 个人信息区域样式 */
#personalInfo {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

#personalInfo.show {
    opacity: 1;
    height: auto;
    margin-top: 20px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 20px;
        margin-bottom: 30px;
    }

    .question-block {
        padding: 20px;
    }

    .option {
        padding: 10px;
    }

    .submit-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .results {
        padding: 20px;
    }
}

/* 自定义单选框和复选框样式 */
input[type="radio"],
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 50%;
    outline: none;
    position: relative;
    margin-right: 10px;
    cursor: pointer;
}

input[type="checkbox"] {
    border-radius: 4px;
}

input[type="radio"]:checked,
input[type="checkbox"]:checked {
    background-color: #3498db;
}

input[type="radio"]:checked::before,
input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
}

input[type="checkbox"]:checked::before {
    width: 6px;
    height: 12px;
    border-radius: 0;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* 加载动画样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.military-badge {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.military-badge i {
    font-size: 40px;
    color: #ffd700;
    position: relative;
    z-index: 2;
    animation: star-pulse 2s infinite;
}

.badge-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 4px solid #ffd700;
    border-radius: 50%;
    animation: circle-rotate 4s linear infinite;
}

.badge-circle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #ffd700;
    border-radius: 50%;
    animation: circle-pulse 2s ease-out infinite;
}

.loading-text {
    color: #fff;
    font-size: 24px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-text span {
    animation: text-bounce 1s ease-in-out infinite;
}

.loading-text span:nth-child(2) { animation-delay: 0.1s; }
.loading-text span:nth-child(3) { animation-delay: 0.2s; }
.loading-text span:nth-child(4) { animation-delay: 0.3s; }
.loading-text span:nth-child(5) { animation-delay: 0.4s; }
.loading-text span:nth-child(6) { animation-delay: 0.5s; }

@keyframes star-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes circle-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes circle-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes text-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 主内容区域动画 */
.main-content {
    transition: opacity 1s ease;
    min-height: 100vh;
}

.main-content.fade-in {
    opacity: 1 !important;
} 