body {
    font-family: Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* 全ページ共通のコンテナスタイル */
.container {
    align-items: stretch;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    align-self: center;
}

.description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #555;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}


/* 入力欄とボタンの間隔を統一 */
.form-group input,
.form-group textarea,
.result input,
.result textarea,
.tab-panel input,
.tab-panel textarea {
    margin-bottom: 0;
}

.form-group button,
.result input + button,
.result textarea + button,
.result > button,
.tab-panel input + button,
.tab-panel textarea + button {
    margin-top: 12px;
}

/* ボタンと説明文の間隔 */
.copy-btn + .instruction-text {
    margin-top: 12px;
}

button:hover {
    background-color: #0056b3;
}

.copy-btn {
    background-color: #28a745;
}

.copy-btn:hover {
    background-color: #218838;
}

.result {
    margin-top: 15px;
}

.result-label {
    font-weight: bold;
    margin-bottom: 10px;
}

.result-text {
    word-break: break-all;
    white-space: pre-wrap;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.result-textarea {
    field-sizing: content;
    min-height: 100px;
    resize: vertical;
}

.auto-resize {
    field-sizing: content;
    min-height: 80px;
    resize: vertical;
}

.note-text {
    margin-top: 10px;
    color: #666;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.links a {
    color: #007bff;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* タブスタイル */
.result-tabs {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin: 0 2px 0 0;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    position: relative;
    top: 1px;
}

.tab-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background-color: white;
    color: #007bff;
    border-color: #ddd;
    border-bottom: 1px solid white;
    font-weight: 500;
}

.tab-content {
    position: relative;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.decrypt-page-url {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

.instruction-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* ヘルプテキストのスタイル */
.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

/* チェックボックス付きラベルのスタイル */
label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    display: inline-block;
}

/* 無効化されたボタンのスタイル */
button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

button:disabled:hover {
    background-color: #6c757d;
}