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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

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

.main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8ecef;
}

.form-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.analyze-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-section {
    animation: fadeInUp 0.6s ease;
}

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

.results-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.analysis-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.work-card {
    border-left: 4px solid #e74c3c;
}

.play-card {
    border-left: 4px solid #f39c12;
}

.learn-card {
    border-left: 4px solid #27ae60;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.score-badge {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.work-card .score-badge {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.play-card .score-badge {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.learn-card .score-badge {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.analysis-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.aspects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.aspect-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.summary-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8ecef;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.balance-chart {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.chart-label {
    width: 60px;
    font-weight: 500;
    font-size: 0.9rem;
}

.chart-progress {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.work-fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.play-fill {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.learn-fill {
    background: linear-gradient(90deg, #27ae60, #229954);
}

.advice-text {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

.detailed-aspects-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8ecef;
    margin-top: 2rem;
}

.detailed-aspects-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.detailed-aspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.detailed-aspect-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.2rem;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.detailed-aspect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.detailed-aspect-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.detailed-aspect-score {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.detailed-aspect-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
    }
}