:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f3f4f6;
    --container-bg: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 700px;
    background-color: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 24px;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

h1 { font-size: 1.5rem; margin: 0; }

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-primary:disabled { background-color: #9ca3af; cursor: not-allowed; }

/* ファイル一覧 */
.file-list { display: flex; flex-direction: column; gap: 12px; }
.file-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}
.file-item:hover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.file-icon { font-size: 1.8rem; margin-right: 16px; }

/* 2段表示用 */
.file-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.file-title { font-weight: bold; font-size: 1.1rem; }
.file-name { font-size: 0.75rem; color: #6b7280; margin-top: 4px; }

.open-label {
    font-size: 0.75rem;
    background-color: #dbeafe;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.loading-msg, .empty-msg, .error-msg { text-align: center; color: #6b7280; padding: 30px; }
.error-msg { color: #ef4444; }

/* ダイアログ（モーダル） */
.upload-dialog {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 24px;
    width: 90%;
    max-width: 450px;
}
.upload-dialog::backdrop { background: rgba(0,0,0,0.5); }
.dialog-title { margin-top: 0; margin-bottom: 20px; font-size: 1.25rem; }

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.form-group label { font-weight: bold; margin-bottom: 8px; font-size: 0.9rem; }
.form-group input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}
.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* ======================================================================
   追加：削除ボタン周りのレイアウト
   ====================================================================== */
.file-actions {
    display: flex;
    align-items: center;
    gap: 8px; /* 開くボタンと削除ボタンの隙間 */
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: #10b981;
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
    text-decoration: none; /* aタグの下線を消す */
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}
.btn-success:hover {
    background-color: #059669;
}
