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

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

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

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

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

.main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.breakdown-section {
    grid-column: 1 / -1;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

.result-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.15);
}

.result-item.impressions {
    border-left: 4px solid #3182ce;
}

.result-item.clicks {
    border-left: 4px solid #38a169;
}

.result-item.conversions {
    border-left: 4px solid #d69e2e;
}

.result-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.result-content {
    flex: 1;
}

.result-label {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1;
}

.result-unit {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}

.additional-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.metric-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
}

.breakdown-steps {
    display: grid;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.step-formula {
    font-size: 1rem;
    color: #4a5568;
    font-family: 'Space Mono', monospace;
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-metrics {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }
    
    .result-item {
        padding: 1rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .additional-metrics {
        grid-template-columns: 1fr;
    }
}

