/* Base Styles */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099cc;
    --background-dark: #1a1a2e;
    --background-darker: #16213e;
    --text-light: #e8f4f8;
    --border-radius: 15px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-darker) 100%);
    color: var(--text-light);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container */
#quiz-container {
    width: 100%;
    max-width: 1000px;
    background: rgba(30, 30, 50, 0.9);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 200, 255, 0.2);
    margin: 1rem auto;
    position: relative;
    overflow: hidden;
}

/* Main Image */
.main-image {
    display: none; /* 画像を非表示にします */
}

/* Headings */
h1, h2, h3 { 
    color: var(--primary-color); 
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Word Display */
#word-display {
    background: linear-gradient(135deg, #0f3460 0%, #0c2741 100%);
    border: 2px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem auto;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    position: relative;
    width: 100%;
    max-width: 800px;
    word-break: break-word;
}

/* Options Container */
#options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 2rem 0;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Option Buttons */
.option-button {
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, #2c5364 0%, #203a43 100%);
    color: #ffffff;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.option-button:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.option-button:active {
    transform: translateY(-1px);
}

.option-button:disabled {
    background: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    color: #888;
    border-color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Buttons */
button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #000000;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto;
    display: block;
}

button:hover {
    background: linear-gradient(135deg, #33ddff 0%, #00aadd 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

#start-button, #restart-button {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin: 1.5rem auto;
    max-width: 250px;
}

/* Progress Info */
#progress-info {
    margin-bottom: 1.5rem;
    overflow: hidden;
    font-size: 1rem;
    text-align: center;
    color: #b8e6f0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

#question-counter,
#score-counter {
    flex: 1;
    min-width: 120px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

/* Feedback Text */
#feedback-text {
    min-height: 1.8em;
    margin: 1.5rem 0;
    font-weight: bold;
    font-size: 1.4rem;
    text-shadow: 0 0 10px currentColor;
    padding: 0.8rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* Result Screen */
#result-screen h2 { 
    margin-bottom: 1.5rem; 
    font-size: 2rem;
    color: var(--primary-color);
}

#result-screen p { 
    margin-bottom: 1.5rem; 
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Quiz List */
.quiz-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    justify-items: center;
    width: 100%;
    flex: 1;
}

.quiz-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.quiz-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.quiz-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.quiz-card p {
    color: #e8f4f8;
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Responsive Adjustments */
@media (min-width: 600px) {
    .quiz-list {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
        justify-content: center;
    }
    
    #options-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (min-width: 768px) {
    #word-display {
        font-size: 2.5rem;
        min-height: 180px;
        padding: 2.5rem;
    }
    
    #start-button, #restart-button {
        font-size: 1.4rem;
        padding: 1.25rem 2.5rem;
    }
    
    #progress-info {
        font-size: 1.1rem;
        text-align: left;
    }
    
    #question-counter { text-align: left; }
    #score-counter { text-align: right; }
}

@media (min-width: 900px) {
    .quiz-list {
        grid-template-columns: repeat(3, minmax(250px, 1fr));
        justify-content: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Animation */
@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Feedback States */
.correct {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.incorrect {
    color: #ff6b6b;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}
