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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: #3498db;
    color: white;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    background: rgba(255, 255, 255, 0.95);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

.content-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.content-box h3 {
    color: #34495e;
    margin-bottom: 1rem;
}

.shapes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.shape-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.shape {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    background: #3498db;
    border: 2px solid #2980b9;
}

.pentagon {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.rectangle {
    width: 80px;
    height: 50px;
}

.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.circle {
    border-radius: 50%;
}

.parallelogram {
    transform: skew(-20deg);
}

.rhombus {
    transform: rotate(45deg);
}

.square {
    width: 60px;
    height: 60px;
}

.btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin: 0.5rem;
}

.btn:hover {
    background: linear-gradient(45deg, #2980b9, #1f5f8b);
}

.result-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
}

.result-box.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-box.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.quiz-container {
    margin: 1.5rem 0;
}

.question {
    background: white;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.question p {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.question label {
    display: block;
    margin: 0.5rem 0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
}

.question label:hover {
    background: #e3f2fd;
}

.grid-container {
    text-align: center;
    margin: 1.5rem 0;
}

.usage-instructions {
    background: #e8f4fd;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #3498db;
}

.usage-instructions p {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.usage-instructions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.usage-instructions li {
    margin: 0.3rem 0;
    color: #34495e;
    line-height: 1.4;
}

#gridCanvas {
    border: 2px solid #3498db;
    border-radius: 10px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.drawing-controls {
    margin: 1rem 0;
    text-align: center;
}

.experiment-container {
    display: grid;
    gap: 2rem;
}

.experiment-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.experiment-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.shape-display {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
}

.experiment-square {
    width: 80px;
    height: 80px;
    background: #e74c3c;
    border: 3px solid #c0392b;
}

.experiment-rectangle {
    width: 120px;
    height: 60px;
    background: #f39c12;
    border: 3px solid #e67e22;
}

.definition-container {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.definition-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.definition-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.definition-card textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.definition-card textarea:focus {
    outline: none;
    border-color: #3498db;
}

footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: #7f8c8d;
} 