body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 800px;
}

h2 {
    margin-top: 0;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 5px;
}

.desc {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    color: #444;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    line-height: 1.4;
}

textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}

#calcBtn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    margin-bottom: 30px;
}

#calcBtn:hover {
    background-color: #357abd;
}

/* --- タブエリアのスタイル --- */
.results-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tabs {
    display: flex;
    background-color: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    border-right: 1px solid #e0e0e0;
    transition: background 0.2s, color 0.2s;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background-color: #eaeaea;
}

.tab-btn.active {
    background-color: #fff;
    color: #4a90e2;
    border-bottom: 2px solid #4a90e2; /* アクティブなタブの下線 */
    margin-bottom: -1px; /* 下線をボーダーに重ねる */
}

/* --- タブコンテンツ --- */
.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none; /* デフォルト非表示 */
}

.tab-pane.active {
    display: block; /* アクティブなものだけ表示 */
}

.pane-header {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* コピーボタンを含むラッパー */
.output-wrapper {
    position: relative; /* コピーボタンの配置基準 */
}

.output {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 1rem;
    color: #212529;
    word-break: break-all;
    white-space: pre-wrap;
    
    background: #f8f9fa;
    padding: 15px;
    /* コピーボタンと被らないように右側にpadding */
    padding-right: 70px; 
    border: 1px solid #e9ecef;
    border-radius: 6px;
    
    /* 大量データ用にスクロール。高さは画面に合わせて調整してください */
    height: 300px; 
    overflow-y: auto;
}

/* コピーボタン */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    
    background-color: #fff;
    border: 1px solid #ccc;
    color: #555;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}