* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: #f5f5f5;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Instructions Page */
#instructionsPage {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 42px;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: #666;
}

.intro-box {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.intro-box h2 {
    font-size: 26px;
    color: #4a148c;
    margin-bottom: 12px;
}

.intro-text {
    font-size: 16px;
    color: #311b92;
    line-height: 1.7;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.info-card {
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.gymnosperm {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #2e7d32;
}

.gymnosperm h3 {
    color: #1b5e20;
}

.gymnosperm p {
    color: #2e7d32;
}

.angiosperm {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-color: #c2185b;
}

.angiosperm h3 {
    color: #880e4f;
}

.angiosperm p {
    color: #ad1457;
}

.monocot {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ef6c00;
}

.monocot h3 {
    color: #e65100;
}

.monocot p {
    color: #ef6c00;
}

.dicot {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-color: #0277bd;
}

.dicot h3 {
    color: #01579b;
}

.dicot p {
    color: #0277bd;
}

.how-to-play {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 3px solid #e0e0e0;
}

.how-to-play h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.instructions-list {
    list-style: none;
}

.instructions-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.fun-tip {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    color: #856404;
    line-height: 1.6;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #757575 0%, #424242 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-3px);
}

/* Game Pages */
#gamePage,
#splitTestPage {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    display: none;
}

#gamePage.active,
#splitTestPage.active {
    display: block !important;
}

.game-container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.game-header {
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.stats-row {
    display: flex;
    gap: 15px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
}

.streak-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.streak-box.hidden {
    display: none !important;
}

.progress-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.level-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.progress-bar-container {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.feedback {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.feedback.hidden {
    display: none !important;
}

.feedback.correct {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    color: white;
}

.feedback.wrong {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drag & Drop Area */
.drag-drop-area {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.items-column {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.items-column h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drag-item {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 15px;
    border-radius: 12px;
    border: 3px solid #ff6b6b;
    cursor: grab;
    font-weight: bold;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drag-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.drag-item:active {
    cursor: grabbing;
}

.item-emoji {
    font-size: 28px;
}

.zones-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.drop-zone {
    background: white;
    border-radius: 20px;
    padding: 25px;
    border: 4px dashed #ccc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-height: 450px;
    transition: all 0.3s;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.drop-zone h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.zone-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.zone-1 h3 {
    color: #2e7d32;
}

.zone-2 h3 {
    color: #c2185b;
}

.zone-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.placed-item {
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    color: #333;
    border: 3px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zone-1 .placed-item {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #2e7d32;
}

.zone-2 .placed-item {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-color: #c2185b;
}

/* Split Test Area */
.split-test-area {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.seed-display {
    max-width: 800px;
    margin: 0 auto;
}

.seed-info {
    text-align: center;
    margin-bottom: 30px;
}

.seed-info h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.seed-info p {
    font-size: 18px;
    color: #666;
}

.seed-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.seed-visual {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-radius: 20px;
    padding: 60px;
    border: 5px solid #fbc02d;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.seed-visual:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.seed-whole {
    font-size: 120px;
    transition: all 0.5s;
}

.seed-split {
    display: flex;
    gap: 30px;
    font-size: 120px;
    animation: splitAnimation 0.5s ease;
}

@keyframes splitAnimation {
    from {
        gap: 0px;
        opacity: 0.5;
    }
    to {
        gap: 30px;
        opacity: 1;
    }
}

.seed-no-split {
    animation: shakeAnimation 0.5s ease;
}

@keyframes shakeAnimation {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.split-question {
    text-align: center;
}

.split-question h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
}

.answer-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.answer-btn {
    background: white;
    border: 4px solid #e0e0e0;
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.answer-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.yes-btn {
    border-color: #4caf50;
}

.yes-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #2e7d32;
}

.no-btn {
    border-color: #f44336;
}

.no-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #c62828;
}

.answer-btn.correct {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%) !important;
    border-color: #2e7d32 !important;
    color: white !important;
    animation: pulse 0.5s;
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%) !important;
    border-color: #c62828 !important;
    color: white !important;
    animation: shake 0.5s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.btn-icon {
    font-size: 48px;
}

.btn-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.answer-btn.correct .btn-text,
.answer-btn.wrong .btn-text {
    color: white !important;
}

/* Level Complete Page */
#levelCompletePage {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: none;
}

#levelCompletePage.active {
    display: flex !important;
}

.level-score-display {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.big-score {
    font-size: 72px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

/* Score Card Page */
#scoreCardPage {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    display: none;
}

#scoreCardPage.active {
    display: flex !important;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.score-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.score-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-label {
    font-size: 14px;
    opacity: 0.9;
}

.accuracy-display {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.accuracy-label {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    font-weight: bold;
}

.accuracy-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.accuracy-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
    width: 0%;
    transition: width 1s ease;
    border-radius: 15px;
}

.accuracy-percent {
    font-size: 32px;
    font-weight: bold;
    color: #4caf50;
}

.learning-summary {
    background: linear-gradient(135deg, #e1bee7 0%, #f8bbd0 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.learning-summary h3 {
    font-size: 24px;
    color: #6a1b9a;
    margin-bottom: 15px;
}

.learning-summary ul {
    list-style: none;
    color: #4a148c;
}

.learning-summary li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.5;
}

.fun-fact {
    background: linear-gradient(135deg, #b2dfdb 0%, #80cbc4 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid #00897b;
}

.fun-fact h3 {
    font-size: 20px;
    color: #004d40;
    margin-bottom: 10px;
}

.fun-fact p {
    font-size: 16px;
    color: #00695c;
    line-height: 1.6;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hidden {
    display: none !important;
}

@media (max-width: 968px) {
    .drag-drop-area {
        grid-template-columns: 1fr;
    }
    
    .zones-column {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .score-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .answer-buttons {
        grid-template-columns: 1fr;
    }
}