* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "メイリオ", Meiryo, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 20px;
}

.subject-selection {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subjects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.subject-btn {
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.subject-btn:hover {
    background-color: #45a049;
}

.quiz-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-container {
    margin: 20px 0;
}

.question {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.answer-input {
    display: flex;
    gap: 10px;
}

#answer {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.admin-panel {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#add-question, #edit-questions, #delete-questions {
    background-color: #2196F3;
}

#add-question:hover, #edit-questions:hover, #delete-questions:hover {
    background-color: #0b7dda;
}

.admin-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.admin-toggle:hover {
    background-color: #0b7dda;
} 