/* 基本レイアウト */
.subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

/* 入力セクション */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
}

.input-group input {
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* 結果セクション */
.result-main {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-item-large {
    color: white;
}

.result-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.result-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.result-card-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.result-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

/* 試算セクション */
.estimation-section {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.estimation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 1rem;
}

.estimation-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.estimation-input label {
    font-weight: 600;
    color: #166534;
    font-size: 0.9rem;
}

.estimation-input input {
    padding: 0.75rem;
    border: 2px solid #86efac;
    border-radius: 8px;
    font-size: 1rem;
}

.estimation-input input:focus {
    outline: none;
    border-color: #22c55e;
}

.estimation-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.estimation-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #86efac;
    color: #166534;
    font-weight: 600;
}

.estimation-item:last-child {
    border-bottom: none;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #475569;
}

.action-btn.primary {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn.primary:hover {
    background: #059669;
}

/* 記録セクション */
.records-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.summary-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

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

.record-info {
    flex: 1;
}

.record-efficiency {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.record-details {
    font-size: 0.85rem;
    color: #64748b;
}

.record-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.record-delete {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.record-delete:hover {
    background: #dc2626;
}

.clear-btn {
    width: 100%;
    padding: 0.75rem;
    background: #64748b;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: #475569;
}

/* 使い方 */
.usage-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.usage-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.step-text p {
    color: #64748b;
    line-height: 1.6;
}

.tips-section {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 1.5rem;
}

.tips-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 1rem;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tips-list li {
    color: #92400e;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: 700;
}

/* 関連ツール */
#relatedToolsContainer {
    margin-top: 3rem;
}

/* 広告セクション */
.ad-section {
    margin-top: 3rem;
    text-align: center;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 2.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .card {
        padding: 1.5rem;
    }
}
