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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 300;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.exercise-section {
    margin-bottom: 50px;
}

.prompt-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.prompt-category {
    display: inline-block;
    background: #ecf0f1;
    color: #2c3e50;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.prompt-text {
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 400;
}

.new-prompt-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-prompt-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.question-input-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

#questionInput {
    width: 100%;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease;
    background: #fafafa;
}

#questionInput:focus {
    outline: none;
    border-color: #3498db;
    background: white;
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: #219a52;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.hint-toggle {
    color: #3498db;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.hint-toggle:hover {
    background: #ecf0f1;
}

.hints-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

.hints-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.hint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.hint-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-size: 0.9rem;
    color: #2c3e50;
}

.questions-history {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.questions-history h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    transition: all 0.2s ease;
}

.question-item:hover {
    background: #ecf0f1;
    transform: translateX(5px);
}

.question-text {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.question-category {
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
}

.empty-state p {
    margin-bottom: 10px;
}

.example-question {
    background: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.example-question:hover {
    background: #ecf0f1;
    transform: translateX(3px);
}

.example-question:last-child {
    margin-bottom: 0;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-item {
    animation: fadeInUp 0.3s ease;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .app {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .prompt-card, .question-input-section, .questions-history {
        padding: 20px;
    }
    
    .input-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .hint-grid {
        grid-template-columns: 1fr;
    }
}