body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

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

#pdf-container {
    width: 100%;
    max-width: var(--max-width);
    max-height: var(--max-height);
    aspect-ratio: var(--aspect-ratio);
    border: none;
    margin: 0 auto 20px auto;
    display: block;
    object-fit: contain;
    overflow: hidden;
}

.pdf-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6c757d;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    min-width: auto;
}

.fullscreen-btn:hover {
    background: #5a6268;
}

.fullscreen-btn i {
    font-size: 14px;
}

.slide-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
}

.share-btn {
    position: absolute;
    top: 15px;
    right: 65px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #28a745;
    color: white;
    padding: 10px;
    text-decoration: none;
    border-radius: 6px;
    width: 44px;
    height: 44px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    min-width: auto;
    z-index: 10;
}

.share-btn:hover {
    background: #1e7e34;
}

.share-btn i {
    font-size: 16px;
}

.fullscreen-info-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #007bff;
    color: white;
    padding: 10px;
    text-decoration: none;
    border-radius: 6px;
    width: 44px;
    height: 44px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    min-width: auto;
    z-index: 10;
}

.fullscreen-info-btn:hover {
    background: #0056b3;
}

.fullscreen-info-btn i {
    font-size: 16px;
}

.back-link {
    margin-bottom: 20px;
    text-align: right;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 14px;
}

.back-btn:hover {
    background: #5a6268;
}

.back-btn i {
    font-size: 14px;
}

/* Toast通知のスタイル */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.toast.success {
    background: rgba(40, 167, 69, 0.9);
}

.toast.error {
    background: rgba(220, 53, 69, 0.9);
}

.slide-info h1 {
    margin-top: 0;
    color: #333;
}

.slide-info time {
    color: #666;
    font-weight: 500;
}

.download-btn {
    display: inline-flex;
    background: #007bff;
    color: white;
    cursor: pointer;
    /* <a>タグのデフォルトスタイルをリセット */
    text-decoration: none;
    outline: none;
    /* ボタンと同じように動作 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.download-btn:hover {
    background: #0056b3;
}

.download-btn i {
    font-size: 16px;
}

.download-btn,
.download-image-btn,
.copy-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    height: 48px;
    /* 高さを固定 */
    box-sizing: border-box;
    /* パディングとボーダーを高さに含める */
    line-height: 1;
    /* 行の高さを1に設定 */
}

.download-image-btn {
    background: #28a745;
    color: white;
}

.download-image-btn:hover {
    background: #1e7e34;
}

.download-image-btn i {
    font-size: 16px;
}

.copy-image-btn {
    background: #6f42c1;
    color: white;
}

.copy-image-btn:hover {
    background: #5a32a3;
}

.copy-image-btn i {
    font-size: 16px;
}

.hashtags {
    margin-top: 10px;
}

.hashtag {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s;
}

.hashtag:hover {
    background: #dee2e6;
}

/* 画面全体表示時のスタイル */
#pdf-container.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: auto;
    margin: 0;
    z-index: 1000;
    background: white;
    overflow: hidden;
}

/* 拡大表示時にスライドとコントロール以外の要素を非表示 */
.slide-info.expanded {
    display: none;
}

.back-link.expanded {
    display: none;
}

/* 拡大表示時のボタンスタイル調整 */
.pdf-controls.expanded {
    /* 位置は常に固定なので変更なし */
}