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

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

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

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1rem;
    color: #666;
}

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

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.input-container label {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
}

.input-container input {
    width: 300px;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 10px;
}

.input-container input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-container button {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.input-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.results-section {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

.rank-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.rank-card h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.rank-info {
    margin-bottom: 30px;
}

.main-rank {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rank-number {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rank-suffix {
    font-size: 1.5rem;
    color: #666;
}

.percentage {
    font-size: 1.3rem;
    color: #666;
    font-weight: 500;
}

.level-badge {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.distribution-chart {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.distribution-chart h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.chart-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: end;
    padding: 20px;
    gap: 8px;
    overflow-x: auto;
}

.chart-bar {
    min-width: 40px;
    background: #e0e0e0;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
}

.chart-bar.current {
    background: linear-gradient(to top, #ff0000, #ff4444);
    box-shadow: 0 -4px 15px rgba(255, 0, 0, 0.3);
}

.chart-bar:hover {
    transform: scaleY(1.05);
}

.chart-legend {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.current {
    background: linear-gradient(135deg, #ff0000, #ff4444);
}

.comparison-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.comparison-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.level-comparison {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.level-item {
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.level-item.current {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.05);
    transform: scale(1.02);
}

.level-item:hover {
    border-color: #ff0000;
    transform: translateY(-2px);
}

.level-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.level-range {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.level-description {
    color: #777;
    font-size: 0.9rem;
}

.continuation-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.continuation-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.continuation-stats {
    display: grid;
    gap: 20px;
}

.continuation-card {
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
}

.continuation-card.user-status {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.05);
}

.continuation-card h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.status-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-size: 0.9rem;
    color: #666;
}

.status-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.status-value.survival-rate {
    color: #ff0000;
    font-size: 1.5rem;
}

.status-value.achievement {
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border-radius: 20px;
    font-size: 1rem;
}

.status-description {
    padding: 15px;
    background: white;
    border-radius: 8px;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

.continuation-chart {
    display: grid;
    gap: 15px;
}

.continuation-level {
    padding: 20px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e0e0e0;
}

.continuation-level.current {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.02);
}

.level-name {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.rate-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.period {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.rate-bar {
    position: relative;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

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

.rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .input-container {
        padding: 30px 20px;
    }
    
    .input-container input {
        width: 100%;
        max-width: 300px;
    }
    
    .rank-number {
        font-size: 3rem;
    }
    
    .chart-container {
        height: 200px;
    }
}