/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面基础样式 */
body {
    font-family: 'Microsoft JhengHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* 头部区域 */
.header {
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 控制按钮区域 */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.shape-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.shape-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.shape-btn.active {
    background: #ffd700;
    color: #333;
}

/* 关系图按钮样式 */
.relationship-diagram-btn, .challenge-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.relationship-diagram-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.challenge-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.relationship-diagram-btn:hover, .challenge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.relationship-diagram-btn.active, .challenge-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

/* 主要动画容器 */
.animation-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 900px;
    width: 100%;
}

/* 形状显示区域 */
.shape-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    min-height: 300px;
}

.shape-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 动画效果 */
.shape {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.shape.morphing {
    animation: morph 1.5s ease-in-out;
}

.shape.transforming {
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes morph {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
}

.shape.animating {
    animation: pulse 0.5s ease-in-out;
}

/* 动画控制按钮区域 */
.animation-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

/* 动画控制按钮 */
.animate-transformation-btn {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.animate-transformation-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.animate-transformation-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 特性对比按钮 */
.comparison-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.comparison-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 进度条 */
.transformation-progress {
    width: 150px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 2px;
}

/* 属性面板 */
.properties-panel {
    flex: 1;
    margin-left: 40px;
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
}

.properties-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.property {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.property.highlight {
    background: #e8f5e8;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.property:hover {
    background: #f0f8ff;
    transform: scale(1.01);
}

.property-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
}

.parallel { background: #4CAF50; }
.equal { background: #2196F3; }
.right-angle { background: #FF9800; }
.diagonal { background: #9C27B0; }

/* SVG 视觉元素样式 */
.visual-element {
    opacity: 0.3;
    transition: all 0.5s ease;
}

.visual-element.highlight {
    opacity: 1;
    filter: drop-shadow(0 0 3px currentColor);
}

.parallel-mark {
    stroke: #4CAF50;
    stroke-width: 2;
    fill: none;
}

.equal-mark {
    stroke: #2196F3;
    stroke-width: 2;
    fill: none;
}

.angle-mark {
    stroke: #FF9800;
    stroke-width: 2;
    fill: none;
}

.general-angle-mark {
    stroke: #FF9800;
    stroke-width: 2;
    fill: none;
}

.diagonal-line {
    stroke: #9C27B0;
    stroke-width: 1.5;
    stroke-dasharray: 3,3;
    fill: none;
}

/* 关系网络区域 */
.relationship-network {
    margin-top: 30px;
    text-align: center;
}

.relationship-info {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.relationship-info.hidden {
    opacity: 0.5;
    background: transparent;
    border-color: transparent;
}

.relationship-info h4 {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.relationship-info.transformation {
    background: #e8f5e8;
    border: 2px solid #4CAF50;
}

.relationship-info.transformation h4 {
    color: #2e7d32;
}

.relationship-info.hidden h4 {
    color: #6c757d;
}

.network-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 120px;
    margin: 0 auto;
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
}

/* 形状节点样式 */
.shape-node {
    padding: 12px 18px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2;
    border: 2px solid #333;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    position: relative;
}

.shape-node.trapezoid { 
    background: #ddbdff; 
    color: #333; 
    width: 90px;
    height: 55px;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    border: none;
    font-size: 13px;
}

.shape-node.parallelogram { 
    background: #ffecb3; 
    color: #333; 
    width: 95px;
    height: 55px;
    transform: skewX(-20deg);
}

.shape-node.parallelogram span {
    transform: skewX(20deg);
    display: block;
    font-size: 12px;
}

.shape-node.rectangle { 
    background: #c8e6c9; 
    color: #333; 
    width: 85px;
    height: 55px;
    border-radius: 0;
}

.shape-node.rhombus { 
    background: #f8bbd9; 
    color: #333; 
    width: 60px;
    height: 60px;
    transform: rotate(45deg);
    border-radius: 0;
}

.shape-node.rhombus span {
    transform: rotate(-45deg);
    display: block;
    font-size: 13px;
}

.shape-node.square { 
    background: #ffd54f; 
    color: #333; 
    width: 60px;
    height: 60px;
    border-radius: 0;
}

.shape-node:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 3;
    transform: scale(1.1);
}

.shape-node.parallelogram:hover {
    transform: skewX(-20deg) scale(1.1);
}

.shape-node.rhombus:hover {
    transform: rotate(45deg) scale(1.1);
}

.shape-node.active {
    color: white !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    transform: scale(1.1);
    z-index: 4;
}

.shape-node.active.parallelogram {
    transform: skewX(-20deg) scale(1.1);
}

.shape-node.active.rhombus {
    transform: rotate(45deg) scale(1.1);
}

/* 主形状动画样式 */
#main-shape {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-shape.morphing {
    animation: morph 1.5s ease-in-out;
}

#main-shape.transforming {
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-shape.animating {
    animation: pulse 0.5s ease-in-out;
}

/* 特性对比样式 */
.property-comparison {
    margin: 15px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f5e8 100%);
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInCategory 0.6s ease forwards;
    overflow: hidden;
}

@keyframes slideInCategory {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 关系图样式 */
#relationship-svg {
    max-width: 100%;
    height: auto;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f5e8 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#relationship-svg rect[data-shape] {
    cursor: pointer;
    transition: all 0.3s ease;
}

#relationship-svg rect[data-shape]:hover {
    stroke-width: 4;
    filter: brightness(1.1);
    transform: scale(1.02);
    transform-origin: center;
}

#relationship-svg text {
    cursor: default;
    user-select: none;
}

#relationship-svg text[style*="cursor: pointer"] {
    cursor: pointer;
}

#relationship-svg text[style*="cursor: pointer"]:hover {
    fill: #333 !important;
    font-weight: bold;
}

/* 特殊處理：長方形和菱形hover時的效果 */
#relationship-svg rect[data-shape="rectangle"],
#relationship-svg rect[data-shape="rhombus"] {
    transition: all 0.3s ease;
}

#relationship-svg rect[data-shape="rectangle"]:hover,
#relationship-svg rect[data-shape="rhombus"]:hover {
    stroke-width: 3;
    filter: brightness(1.2) drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transform: scale(1.05);
}

/* 正方形的特殊處理 */
#relationship-svg rect[data-shape="square"] {
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 菱形的特殊處理 */
#relationship-svg rect[data-shape="rhombus"] {
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 當正方形被遮擋時的樣式類 */
#relationship-svg rect[data-shape="square"].dimmed {
    opacity: 0.3;
    transform: scale(0.95);
    transform-origin: center;
}

/* 當菱形被遮擋時的樣式類 */
#relationship-svg rect[data-shape="rhombus"].dimmed {
    opacity: 0.3;
    transform: scale(0.95);
    transform-origin: center;
}

/* 挑战界面样式 */
.challenge-container, .challenge-result-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* 隐藏图形显示区域的样式 */
.question-shape-display.hidden {
    display: none;
}

/* 问题区域占满全宽时的样式 */
.question-area {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.question-area.shape-hidden {
    justify-content: center;
}

.question-area.shape-hidden .question-content {
    max-width: 600px;
    margin: 0 auto;
}

/* 答对反馈动画 */
@keyframes correctPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.challenge-header h2 {
    color: #333;
    margin: 0;
    font-size: 2em;
}

.challenge-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 重置进度按钮样式 */
.reset-progress-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    opacity: 0.8;
}

.reset-progress-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.reset-progress-btn:active {
    transform: translateY(0);
}

/* 确认对话框样式 */
.reset-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

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

.reset-confirmation-dialog {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reset-confirmation-dialog h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.reset-confirmation-dialog p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.reset-confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.reset-confirm-btn, .reset-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.reset-confirm-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.reset-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.reset-cancel-btn {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.reset-cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
#question-counter {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.score-display {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.score-display span {
    padding: 5px 12px;
    border-radius: 15px;
    background: #f0f8ff;
    color: #333;
    font-weight: bold;
}

.question-shape-display {
    flex: 0 0 300px;
    text-align: center;
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
}

.question-shape-display h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
}

.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question-text h4 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.question-type {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

.answer-buttons {
    display: flex;
    gap: 20px;
}

.answer-btn {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.true-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.false-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.answer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.answer-feedback {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feedback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.feedback-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.feedback-icon.correct::before {
    content: '🎉';
}

.feedback-icon.wrong::before {
    content: '😅';
}

.feedback-text {
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.next-question-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 挑战结果界面样式 */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.final-score {
    margin-bottom: 20px;
}

.score-circle {
    display: inline-block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

#final-score-text {
    font-size: 24px;
    font-weight: bold;
}

.score-label {
    font-size: 12px;
    margin-top: 5px;
}

/* 总体进度样式 */
.overall-progress {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    border: 2px solid #e0e8ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.overall-progress h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.overall-progress .progress-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.overall-progress .progress-stat {
    text-align: center;
    min-width: 80px;
}

.overall-progress .progress-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.overall-progress .progress-stat-label {
    font-size: 14px;
    color: #666;
}

.overall-progress .progress-bar-container {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 10px;
    position: relative;
}

.overall-progress .progress-bar-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    transition: width 0.8s ease;
    border-radius: 10px;
}

.overall-progress .completion-text {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 完成挑战特殊样式 */
.completion-container {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f5e8 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.completion-container .completion-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.completion-container h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.completion-container .completion-description {
    font-size: 1.4em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.completion-container .master-badge {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0 40px 0;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.completion-container .completion-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.completion-container .completion-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.completion-container .completion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.completion-container .completion-btn.home-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.performance-summary h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.performance-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.stat-item {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.wrong-questions-review h3, .knowledge-points-summary h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.wrong-question-item {
    background: #fff5f5;
    border-left: 4px solid #ff6b6b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.wrong-question-text {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.correct-answer {
    color: #4CAF50;
    font-size: 14px;
}

.knowledge-point-item {
    background: #e8f5e8;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.knowledge-point-category {
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 5px;
}

.knowledge-point-details {
    color: #666;
    font-size: 14px;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.result-action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.home-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.result-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 进度管理提示样式 */
.progress-hint {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    color: #1565c0;
    font-size: 14px;
    line-height: 1.5;
}

.progress-hint strong {
    color: #0d47a1;
}

.progress-hint .hint-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
}

/* Cookie管理状态提示 */
.cookie-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 12px;
    color: #666;
    max-width: 200px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.cookie-status.success {
    border-left: 4px solid #4CAF50;
}

.cookie-status.warning {
    border-left: 4px solid #FF9800;
}

.cookie-status.error {
    border-left: 4px solid #f44336;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .shape-display {
        flex-direction: column;
    }
    
    .properties-panel {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .network-container {
        flex-wrap: wrap;
        height: auto;
        gap: 15px;
        justify-content: center;
        padding: 15px;
    }
    
    .shape-node {
        margin: 5px;
    }
    
    .shape-node.parallelogram span,
    .shape-node.rhombus span {
        font-size: 11px;
    }

    .animation-controls {
        flex-direction: column;
        align-items: center;
    }

    /* 关系图响应式调整 */
    #relationship-svg {
        width: 100%;
        height: 350px;
    }
    
    #relationship-svg text {
        font-size: 8px !important;
    }
    
    #relationship-svg .explanation-text {
        font-size: 6px !important;
    }
    
    /* 隐藏移动端上过小的文本 */
    #relationship-svg text[font-size="10"],
    #relationship-svg text[font-size="11"] {
        display: none;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .relationship-diagram-btn, .challenge-btn {
        order: -1; /* 在移动端将这些按钮放到最前面 */
        font-size: 14px;
        padding: 10px 16px;
    }

    /* 挑战界面响应式 */
    .challenge-container, .challenge-result-container {
        padding: 15px;
    }

    .challenge-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        justify-content: center;
    }

    .question-area {
        flex-direction: column;
    }

    .question-area.shape-hidden {
        align-items: center;
    }

    .question-area.shape-hidden .question-content {
        max-width: 100%;
    }

    .question-shape-display {
        margin-bottom: 20px;
    }

    #challenge-shape-svg {
        width: 150px;
        height: 150px;
    }

    .answer-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .performance-stats {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        flex-direction: column;
        gap: 15px;
    }

    /* 总体进度响应式 */
    .overall-progress .progress-stats {
        flex-direction: column;
        gap: 15px;
    }

    .completion-container {
        padding: 40px 15px;
    }

    .completion-container .completion-actions {
        flex-direction: column;
        gap: 10px;
    }

    .completion-container .completion-btn {
        width: 100%;
    }

    /* Cookie状态提示响应式 */
    .cookie-status {
        bottom: 10px;
        right: 10px;
        max-width: 150px;
        font-size: 11px;
    }
}

/* 图片浏览器样式 */
.image-viewer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
}

.image-container {
    margin-bottom: 15px;
}

.image-container img {
    max-width: 600px;
    max-height: 400px;
    object-fit: contain;
}

.image-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.image-nav-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.image-nav-btn:hover {
    background: #45a049;
}

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

#image-counter {
    font-size: 14px;
    color: #666;
}

/* Tab切换样式 */
.content-tabs {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #4CAF50;
    color: white;
}

.tab-content {
    position: relative;
    min-height: 450px;
}

.tab-panel {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tab-panel.active {
    display: block;
}

/* 图片显示区域样式 */
.image-container {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.image-nav-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.image-nav-btn:hover {
    background: #45a049;
}

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

#image-counter {
    font-size: 14px;
    color: #666;
}