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

body {
    font-family: 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFEFD5 50%, #FFE4B5 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.main-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: #FFFBF0;
    padding: 25px;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.15);
    width: 280px;
    min-width: 280px;
    overflow-y: auto;
    height: 100vh;
    position: fixed;
    top: 0;
}

.sidebar-left {
    left: 0;
    border-right: 2px solid #F4E4C1;
}

.sidebar-right {
    right: 0;
    border-left: 2px solid #F4E4C1;
}

.sidebar h2 {
    color: #D4A017;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #E8C468;
    padding-bottom: 10px;
}

.sidebar h3 {
    color: #D4A017;
    font-size: 1.2em;
    margin: 20px 0 15px 0;
}

.fruit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fruit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8f9fa;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.fruit-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.fruit-emoji {
    font-size: 1.5em;
    margin-right: 10px;
    display: inline-block;
    width: 30px;
    text-align: center;
}

.fruit-item span {
    margin-left: auto;
    font-weight: bold;
    color: #D4A017;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
}

main {
    margin-left: 280px;
    margin-right: 280px;
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.game-section {
    background: #FFFBF0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(218, 165, 32, 0.2);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #D4A017;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(212, 160, 23, 0.2);
}

.music-toggle {
    background: linear-gradient(135deg, #F4D03F 0%, #D4A017 100%);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
    margin-bottom: 20px;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 160, 23, 0.5);
}

.audio-settings {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.audio-item {
    margin-bottom: 10px;
}


.score-board {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #F9E79F 0%, #F4D03F 100%);
    border-radius: 15px;
    color: #5D4E37;
    margin-bottom: 20px;
}

.score-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 10px;
}

.score-label {
    font-size: 0.9em;
    font-weight: 600;
    opacity: 0.9;
}

.score-value {
    font-size: 2em;
    font-weight: bold;
    margin-top: 5px;
    color: #D4A017;
}

.next-fruit {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #FCF3CF 0%, #F9E79F 100%);
    border-radius: 15px;
    color: #5D4E37;
}

.next-fruit-preview {
    display: inline-block;
    margin-top: 10px;
    font-size: 1.2em;
}

#gameCanvas {
    border: 4px solid #E8C468;
    border-radius: 15px;
    display: block;
    margin: 0 auto 20px;
    background: linear-gradient(to bottom, #FFFEF0 0%, #FFFBF0 100%);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><text y="24" font-size="24">👆</text></svg>') 16 0, pointer;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(212, 160, 23, 0.15);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.2);
}

.start-btn {
    background: linear-gradient(135deg, #F4D03F 0%, #D4A017 100%);
    color: #5D4E37;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 160, 23, 0.4);
}

.start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reset-btn {
    background: linear-gradient(135deg, #F9E79F 0%, #E8C468 100%);
    color: #5D4E37;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 196, 104, 0.4);
}



.game-over {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFFBF0;
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(212, 160, 23, 0.3);
    text-align: center;
    z-index: 1000;
    border: 3px solid #E8C468;
}

.game-over.show {
    display: block;
}

.game-over h2 {
    color: #D4A017;
    font-size: 3em;
    margin-bottom: 20px;
}

.game-over p {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #5D4E37;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 160, 23, 0.3);
    z-index: 999;
}

.overlay.show {
    display: block;
}

.seo-content {
    margin-top: 40px;
    padding: 30px;
    background: #FFFBF0;
    border-radius: 15px;
    border: 2px solid #F4E4C1;
}

.seo-content h2 {
    color: #D4A017;
    font-size: 2em;
    margin-bottom: 20px;
}

.seo-content h3 {
    color: #D4A017;
    font-size: 1.5em;
    margin: 25px 0 15px 0;
}

.seo-content p {
    margin-bottom: 15px;
    color: #5D4E37;
    font-size: 1.05em;
}

.seo-content ul {
    margin: 15px 0 15px 30px;
}

.seo-content li {
    margin-bottom: 10px;
    color: #5D4E37;
}

/* Mobile Top Bar */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #F9E79F 0%, #F4D03F 100%);
    padding: 8px 12px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(212, 160, 23, 0.3);
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.mobile-score-section {
    display: flex;
    gap: 10px;
    flex: 1;
}

.mobile-score-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    border-radius: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 40px;
}

.mobile-score-label {
    font-size: 0.65em;
    font-weight: 600;
    color: #5D4E37;
    line-height: 1;
    margin-bottom: 2px;
}

.mobile-score-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #D4A017;
    line-height: 1;
}

.mobile-next-fruit {
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    border-radius: 8px;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 40px;
}

.mobile-next-label {
    font-size: 0.65em;
    font-weight: 600;
    color: #5D4E37;
    line-height: 1;
    margin-bottom: 2px;
}

.mobile-next-preview {
    font-size: 1.3em;
    line-height: 1;
}

.mobile-music-toggle {
    background: linear-gradient(135deg, #F4D03F 0%, #D4A017 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.3);
    margin-left: 8px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .mobile-top-bar {
        display: flex;
        gap: 10px;
    }

    body {
        padding-top: 56px;
    }

    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }

    main {
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
    }

    .main-container {
        flex-direction: column;
        padding-block: 30px;
    }

    .game-section {
        padding: 15px;
    }

    .header {
        margin-top: 10px;
    }

    .header h1 {
        font-size: 1.8em;
        margin-top: 0;
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }

    .controls {
        flex-wrap: wrap;
    }

    button {
        padding: 12px 30px;
        font-size: 1em;
    }

    .seo-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .score-value {
        font-size: 1.6em;
    }

    button {
        padding: 12px 25px;
        font-size: 1em;
    }

    .music-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

.audio-item label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.audio-item input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.85em;
}

