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

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.main-content {
    padding: 40px 30px;
}

.input-section {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 30px;
}

.label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    font-size: 1rem;
}

.textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.question-types {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.type-btn:hover {
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.type-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

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

.generate-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.generate-btn.loading .btn-text {
    opacity: 0;
}

.generate-btn.loading .loading-spinner {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.results-section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.results-section.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #374151;
}

.questions-container {
    margin-bottom: 30px;
}

.question-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.question-card:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 10px;
}

.question-type {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.regenerate-btn {
    padding: 12px 24px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.regenerate-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.analysis-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-out;
}

.analysis-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.analysis-title::before {
    content: "🧠";
    margin-right: 8px;
    font-size: 1.2rem;
}

.analysis-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #0369a1;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.question-reasoning {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .question-types {
        gap: 8px;
    }
    
    .type-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .question-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .question-reasoning {
        min-width: auto;
    }
}