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

body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.game-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

.header {
    margin-bottom: 15px;
}

.info {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
}

.target-sentence {
    margin-bottom: 15px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.target-sentence p {
    margin: 0;
    font-size: 16px;
    color: #4a5568;
}

#gameCanvas {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* ゲームスタート画面 */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 15px;
}

.start-content {
    text-align: center;
    padding: 40px;
}

.start-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 28px;
}

.start-content p {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 16px;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.instructions {
    margin-top: 15px;
    color: #4a5568;
    font-size: 14px;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
}

.modal-content p {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 18px;
}

#restartBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#restartBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.hidden {
    display: none !important;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-controls {
        grid-template-columns: 1fr;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

.file-upload-container {
    margin-bottom: 20px;
    color: #4a5568;
}

.file-upload-container label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

#sentenceFile {
    display: inline-block;
}

/* Footer Styles */
.site-footer {
    background-color: #2d3748; /* bg-gray-800 */
    color: #ffffff; /* text-white */
    padding-top: 2rem; /* py-8 */
    padding-bottom: 2rem; /* py-8 */
}

.footer-container {
    max-width: 1280px; /* container */
    margin-left: auto; /* mx-auto */
    margin-right: auto; /* mx-auto */
    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem; /* px-6 */
    text-align: center; /* text-center */
}

.footer-copyright {
    color: #a0aec0; /* text-gray-400 */
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem; /* space-x-4 */
    margin-top: 1rem; /* mt-4 */
}

.footer-links a {
    color: #a0aec0; /* text-gray-400 */
    text-decoration: none;
    transition: color 0.3s; /* transition-colors duration-300 */
}

.footer-links a:hover {
    color: #ffffff; /* hover:text-white */
}

.sound-credit {
    margin-top: 25px;
    font-size: 12px;
    color: #4a5568;
}

.sound-credit a {
    color: #4a5568;
}
