/**
 * マカイクラウド - フロントCSS
 * 公開ページ（アップロード、ダウンロード）固有のスタイル
 * 新デザイン：深い青 + シアンアクセント
 */

/* ========== 背景エフェクト ========== */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-effects::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 10%, var(--bg-gradient-1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, var(--bg-gradient-2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, var(--bg-gradient-3) 0%, transparent 70%);
    animation: bgPulse 20s ease-in-out infinite;
}

.bg-effects::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, transparent 0%, rgba(1, 33, 87, 0.3) 100%);
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-3%, -3%) scale(1.05); }
}

/* 浮遊する光の粒子 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    box-shadow: 0 0 10px var(--particle-color);
    /* 初期状態：画面下に隠す */
    transform: translateY(100vh) scale(0);
    opacity: 0;
}

/* サイズバリエーション */
.particle-sm {
    width: 4px;
    height: 4px;
    opacity: 0.4;
}

.particle-md {
    width: 8px;
    height: 8px;
    opacity: 0.35;
    box-shadow: 0 0 15px var(--particle-color);
}

.particle-lg {
    width: 12px;
    height: 12px;
    opacity: 0.3;
    box-shadow: 0 0 20px var(--particle-color), 0 0 40px var(--particle-color);
}

.particle-xl {
    width: 18px;
    height: 18px;
    opacity: 0.25;
    box-shadow: 0 0 30px var(--particle-color), 0 0 60px var(--particle-color);
}

/* 位置とタイミング（15個） */
.particle:nth-child(1)  { left: 5%;  animation-delay: 0s;   animation-duration: 18s; }
.particle:nth-child(2)  { left: 12%; animation-delay: 2s;   animation-duration: 22s; }
.particle:nth-child(3)  { left: 20%; animation-delay: 4s;   animation-duration: 16s; }
.particle:nth-child(4)  { left: 28%; animation-delay: 1s;   animation-duration: 20s; }
.particle:nth-child(5)  { left: 35%; animation-delay: 3s;   animation-duration: 24s; }
.particle:nth-child(6)  { left: 42%; animation-delay: 5s;   animation-duration: 17s; }
.particle:nth-child(7)  { left: 50%; animation-delay: 0.5s; animation-duration: 21s; }
.particle:nth-child(8)  { left: 58%; animation-delay: 2.5s; animation-duration: 19s; }
.particle:nth-child(9)  { left: 65%; animation-delay: 4.5s; animation-duration: 23s; }
.particle:nth-child(10) { left: 72%; animation-delay: 1.5s; animation-duration: 15s; }
.particle:nth-child(11) { left: 78%; animation-delay: 3.5s; animation-duration: 18s; }
.particle:nth-child(12) { left: 84%; animation-delay: 0s;   animation-duration: 20s; }
.particle:nth-child(13) { left: 90%; animation-delay: 2s;   animation-duration: 22s; }
.particle:nth-child(14) { left: 95%; animation-delay: 4s;   animation-duration: 16s; }
.particle:nth-child(15) { left: 50%; animation-delay: 6s;   animation-duration: 25s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    5% {
        opacity: var(--particle-opacity, 0.4);
        transform: translateY(95vh) scale(0.5);
    }
    15% {
        opacity: var(--particle-opacity, 0.4);
        transform: translateY(80vh) scale(1);
    }
    50% {
        opacity: var(--particle-opacity, 0.35);
        transform: translateY(50vh) scale(1.1) translateX(20px);
    }
    85% {
        opacity: var(--particle-opacity, 0.25);
        transform: translateY(15vh) scale(0.9) translateX(-10px);
    }
    95% {
        opacity: 0.1;
        transform: translateY(5vh) scale(0.5);
    }
}

/* キャラクターパーティクル */
.chara-particle {
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
    animation: floatChara 20s infinite ease-in-out;
    /* 初期状態：画面下に隠す */
    transform: translateY(100vh) scale(0) rotate(0deg);
    opacity: 0;
    pointer-events: none;
}

/* テーマ別カラーフィルター */
[data-theme="ocean"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(73%) sepia(53%) saturate(465%) hue-rotate(162deg) brightness(101%) contrast(95%);
}

[data-theme="forest"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(66%) sepia(41%) saturate(476%) hue-rotate(81deg) brightness(94%) contrast(88%);
}

[data-theme="sunset"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(70%) sepia(60%) saturate(800%) hue-rotate(346deg) brightness(105%) contrast(100%);
}

[data-theme="makai"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(47%) sepia(83%) saturate(2028%) hue-rotate(252deg) brightness(101%) contrast(96%);
}

[data-theme="midnight"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(54%) sepia(57%) saturate(506%) hue-rotate(191deg) brightness(95%) contrast(91%);
}

[data-theme="dawn"] .chara-particle {
    filter: brightness(0) saturate(100%) invert(73%) sepia(82%) saturate(399%) hue-rotate(325deg) brightness(102%) contrast(97%);
}

/* サイズバリエーション */
.chara-particle-sm {
    width: 24px;
    height: 24px;
    opacity: 0.2;
}

.chara-particle-md {
    width: 36px;
    height: 36px;
    opacity: 0.18;
}

.chara-particle-lg {
    width: 48px;
    height: 48px;
    opacity: 0.15;
}

/* 位置とタイミング（8個のキャラパーティクル） */
.chara-particle:nth-child(16) { left: 8%;  animation-delay: 1s;   animation-duration: 25s; }
.chara-particle:nth-child(17) { left: 22%; animation-delay: 5s;   animation-duration: 28s; }
.chara-particle:nth-child(18) { left: 38%; animation-delay: 3s;   animation-duration: 22s; }
.chara-particle:nth-child(19) { left: 55%; animation-delay: 7s;   animation-duration: 30s; }
.chara-particle:nth-child(20) { left: 68%; animation-delay: 2s;   animation-duration: 26s; }
.chara-particle:nth-child(21) { left: 82%; animation-delay: 6s;   animation-duration: 24s; }
.chara-particle:nth-child(22) { left: 92%; animation-delay: 4s;   animation-duration: 27s; }
.chara-particle:nth-child(23) { left: 45%; animation-delay: 8s;   animation-duration: 32s; }

@keyframes floatChara {
    0%, 100% {
        transform: translateY(100vh) scale(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.15;
        transform: translateY(95vh) scale(0.5) rotate(5deg);
    }
    15% {
        opacity: 0.2;
        transform: translateY(80vh) scale(1) rotate(-5deg);
    }
    30% {
        opacity: 0.18;
        transform: translateY(65vh) scale(1.05) rotate(8deg) translateX(15px);
    }
    50% {
        opacity: 0.15;
        transform: translateY(50vh) scale(1) rotate(-8deg) translateX(-20px);
    }
    70% {
        opacity: 0.12;
        transform: translateY(30vh) scale(0.95) rotate(5deg) translateX(10px);
    }
    85% {
        opacity: 0.08;
        transform: translateY(15vh) scale(0.8) rotate(-3deg) translateX(-5px);
    }
    95% {
        opacity: 0.03;
        transform: translateY(5vh) scale(0.5) rotate(0deg);
    }
}

/* ========== コンテナ ========== */
.front-container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ========== ヘッダー ========== */
.front-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.front-logo {
    margin-bottom: 0.5rem;
    text-decoration: none;
    outline: none;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
}

.front-logo img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(79, 195, 247, 0.4));
    border: none;
    outline: none;
    pointer-events: none;
}

.front-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow:
        0 0 40px rgba(79, 195, 247, 0.6),
        0 0 80px rgba(79, 195, 247, 0.3);
    letter-spacing: 0.15em;
}

.front-tagline {
    color: var(--text-dim);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ========== タブ ========== */
.front-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-darker);
    padding: 0.375rem;
    border-radius: var(--radius-lg);
    position: relative;
}

/* スライディングインジケーター */
.front-tabs-slider {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    width: calc(50% - 0.625rem);
    height: calc(100% - 0.75rem);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
    transition: transform 0.15s ease-out;
    z-index: 0;
    pointer-events: none;
}

.front-tabs-slider.slide-right {
    transform: translateX(calc(100% + 0.5rem));
}

.front-tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color var(--transition);
    position: relative;
    z-index: 1;
}

.front-tab-btn.active {
    color: white;
}

.front-tab-btn:hover:not(.active) {
    color: var(--text);
}

/* タブコンテンツ */
.tab-content {
    display: none;
}

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

/* ファイル選択時：ドロップゾーンをリスト下に移動するためflex化 */
.tab-content.active.has-files {
    display: flex;
    flex-direction: column;
}

.tab-content.active.has-files .file-list {
    order: 0;
}

.tab-content.active.has-files .front-dropzone {
    order: 1;
}

.tab-content.active.has-files .file-preview {
    order: 0;
}

.tab-content.active.has-files .options {
    order: 2;
}

.tab-content.active.has-files .upload-btn {
    order: 3;
}

.tab-content.active.has-files .progress-container {
    order: 4;
}

.tab-content.active.has-files .result {
    order: 5;
}

.tab-content.active.has-files .lightbox {
    order: 6;
}

/* ========== ドロップゾーン（フロント用強化版） ========== */
.front-dropzone {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.front-dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(79, 195, 247, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.front-dropzone:hover::before,
.front-dropzone.dragover::before {
    opacity: 1;
}

.front-dropzone:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow:
        0 20px 40px rgba(1, 33, 87, 0.4),
        0 0 30px rgba(79, 195, 247, 0.1);
}

.front-dropzone.dragover {
    border-color: var(--accent-glow);
    background: linear-gradient(145deg, rgba(79, 195, 247, 0.1), var(--bg-darker));
    transform: scale(1.02);
    box-shadow:
        0 25px 50px rgba(1, 33, 87, 0.5),
        0 0 60px rgba(79, 195, 247, 0.2);
}

.front-dropzone-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    color: var(--accent);
    opacity: 0.9;
    transition: all 0.3s;
}

.front-dropzone:hover .front-dropzone-icon {
    transform: scale(1.1);
    opacity: 1;
}

.front-dropzone.dragover .front-dropzone-icon {
    transform: scale(1.2) translateY(-5px);
    filter: drop-shadow(0 0 20px rgba(79, 195, 247, 0.6));
}

.front-dropzone-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.front-dropzone-hint {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.front-dropzone input[type="file"] {
    display: none;
}

/* ドロップゾーン：ファイル追加ミニモード */
.front-dropzone.mini {
    padding: 1rem 1.5rem;
    border-style: dashed;
    border-width: 1.5px;
    border-color: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 0;
    margin-bottom: 1rem;
    order: 1;
}

.front-dropzone.mini::before {
    display: none;
}

.front-dropzone.mini .front-dropzone-icon {
    width: 22px;
    height: 22px;
    margin: 0;
    opacity: 0.7;
}

.front-dropzone.mini .front-dropzone-text {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-dim);
}

.front-dropzone.mini .front-dropzone-hint {
    display: none;
}

.front-dropzone.mini:hover {
    border-color: var(--accent);
    transform: none;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.08);
}

.front-dropzone.mini:hover .front-dropzone-text {
    color: var(--accent);
}

.front-dropzone.mini:hover .front-dropzone-icon {
    opacity: 1;
    color: var(--accent);
}

.front-dropzone.mini.dragover {
    border-color: var(--accent-glow);
    background: linear-gradient(145deg, rgba(79, 195, 247, 0.08), var(--bg-darker));
    transform: none;
    box-shadow: 0 0 30px rgba(79, 195, 247, 0.15);
}

/* ========== ファイルプレビュー ========== */
.file-preview {
    display: none;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-preview.active {
    display: block;
}

.file-preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.file-icon svg {
    width: 26px;
    height: 26px;
}

.file-icon.has-thumb {
    background: none;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.file-icon.has-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 700;
    font-size: 1rem;
    word-break: break-all;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.file-remove:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ========== ファイルリスト（複数） ========== */
.file-list {
    display: none;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.file-list.active {
    display: block;
    animation: slideIn 0.3s ease;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.file-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.file-list-clear {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color var(--transition);
}

.file-list-clear:hover {
    color: var(--danger);
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(21, 101, 192, 0.3);
}

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

.file-list-thumb {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.file-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-list-thumb svg {
    width: 18px;
    height: 18px;
    color: var(--text-dim);
}

.file-list-info {
    flex: 1;
    min-width: 0;
}

.file-list-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.file-list-size {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.file-list-remove {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.file-list-remove:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.zip-notice {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-glow);
    text-align: center;
}

/* ========== 納品モードスイッチ ========== */
.delivery-mode-container {
    margin-bottom: 1.25rem;
}

.delivery-mode-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, var(--bg-darker), var(--bg-dark));
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.delivery-mode-switch:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.delivery-mode-switch.active {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-color: #22c55e;
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.3);
}

.delivery-mode-track {
    position: relative;
    width: 70px;
    height: 38px;
    background: var(--bg-dark);
    border-radius: 19px;
    border: 2px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.delivery-mode-switch.active .delivery-mode-track {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.delivery-mode-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 30px;
    height: 30px;
    background: linear-gradient(145deg, #fff, #e5e5e5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.delivery-mode-thumb i {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.delivery-mode-switch.active .delivery-mode-thumb {
    left: calc(100% - 32px);
    background: linear-gradient(145deg, #fff, #dcfce7);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(34, 197, 94, 0.4);
}

.delivery-mode-switch.active .delivery-mode-thumb i {
    color: #16a34a;
    transform: scale(1.1);
}

.delivery-mode-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.delivery-mode-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s ease;
}

.delivery-mode-switch.active .delivery-mode-title {
    color: #4ade80;
}

.delivery-mode-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.delivery-mode-switch.active .delivery-mode-desc {
    color: #86efac;
}

/* ホバーアニメーション */
.delivery-mode-switch:hover .delivery-mode-thumb {
    transform: scale(1.05);
}

.delivery-mode-switch.active:hover .delivery-mode-thumb {
    transform: scale(1.05);
}

/* ========== オプション ========== */
.options {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.options-title {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ========== アップロードボタン ========== */
.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(79, 195, 247, 0.4),
        0 0 30px rgba(79, 195, 247, 0.2);
}

.upload-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-btn svg {
    width: 24px;
    height: 24px;
}

/* ========== プログレス ========== */
.progress-container {
    display: none;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.progress-container.active {
    display: block;
    animation: slideIn 0.3s ease;
}

.progress-status {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 10px;
    background: var(--bg-dark);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
}

/* ========== 結果表示 ========== */
.result {
    display: none;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 2px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success), #4ade80);
}

.result.active {
    display: block;
    animation: resultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result.error {
    border-color: var(--danger);
}

.result.error::before {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

@keyframes resultPop {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--success);
}

.result.error .result-title {
    color: var(--danger);
}

/* 結果プレビュー */
.result-preview {
    margin-bottom: 1.25rem;
    display: none;
}

.result-preview.active {
    display: block;
}

/* 画像プレビュー */
.result-preview .preview-image-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.result-preview .preview-image {
    max-height: 360px;
    max-width: 100%;
    border-radius: var(--radius);
    object-fit: contain;
}

/* 動画プレイヤー */
.result-preview .video-player-container {
    max-width: 100%;
}

/* オーディオプレイヤー */
.result-preview .audio-player-container {
    max-width: 100%;
    padding: 1rem;
}

.result-preview .audio-visualizer {
    height: 60px;
    margin-bottom: 1rem;
}

.result-preview .audio-btn-play {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
}

.result-preview .audio-btn-skip {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
}

.result-preview .audio-main-controls {
    gap: 0.875rem;
    margin-bottom: 0.5rem;
}

.result-preview .audio-volume-control {
    padding: 0.35rem 0.6rem;
}

.result-preview .audio-volume-slider {
    width: 65px;
    margin-right: 6px;
}

/* PDFビューア */
.result-preview .pdf-viewer-container {
    height: 300px;
}

.result-url {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-url input {
    flex: 1;
    background: none;
    border: none;
    color: var(--accent-glow);
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.result-url input:focus {
    outline: none;
}

.copy-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 1.125rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.copy-all-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-all-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.result-qr {
    text-align: center;
    margin: 1.25rem 0;
}

.result-qr canvas {
    border-radius: var(--radius);
    background: white;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.result-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.new-upload-btn {
    margin-top: 1.25rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.new-upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 195, 247, 0.05);
}

/* ========== 使用状況ウィジェット ========== */
.usage-widget {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.usage-row {
    display: flex;
    gap: 1rem;
}

.usage-item {
    flex: 1;
    min-width: 0;
}

/* 下段：制限値表示 */
.usage-limits {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.usage-limit-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-dim);
}

.usage-limit-item i {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.7;
}

.usage-limit-label {
    flex: 1;
}

.usage-limit-value {
    font-weight: 600;
    color: var(--text);
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.usage-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.usage-label i {
    font-size: 0.875rem;
    color: var(--accent);
}

.usage-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.usage-bar {
    height: 6px;
    background: var(--bg-darker);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.usage-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.usage-bar.warning .usage-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.usage-bar.danger .usage-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* 無制限スタイル */
.usage-unlimited {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(79, 195, 247, 0.15);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    margin-left: 0.25rem;
}

.usage-bar.unlimited {
    background: linear-gradient(90deg, rgba(79, 195, 247, 0.1), rgba(79, 195, 247, 0.05));
}

.usage-bar.unlimited .usage-fill {
    background: linear-gradient(90deg, rgba(79, 195, 247, 0.4), rgba(79, 195, 247, 0.2));
    animation: none;
}

.usage-bar.unlimited .usage-fill::after {
    background: linear-gradient(90deg, transparent 0%, rgba(79, 195, 247, 0.3) 50%, transparent 100%);
    animation: shimmer 3s infinite ease-in-out;
}

@media (max-width: 480px) {
    .usage-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .usage-limit-item {
        font-size: 0.65rem;
    }
}

/* ========== 履歴 ========== */
.history-section {
    margin-top: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
}

.history-item {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all var(--transition);
}

.history-item:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
    box-shadow: -4px 0 20px rgba(79, 195, 247, 0.1);
}

.history-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* 拡張子バッジ */
.history-ext-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 700;
    transition: all var(--transition);
}

.history-ext-badge i {
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.history-ext-badge .ext-text {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* カテゴリ別カラー */
.history-ext-badge[data-category="image"] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.history-ext-badge[data-category="video"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.history-ext-badge[data-category="audio"] {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.history-ext-badge[data-category="archive"] {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.history-ext-badge[data-category="document"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.history-ext-badge[data-category="code"] {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.history-ext-badge[data-category="other"] {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.history-item:hover .history-ext-badge {
    transform: scale(1.05);
}

.history-item-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.history-item:hover .history-item-thumb {
    transform: scale(1.05);
}

.history-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.history-item-thumb img[src] {
    opacity: 1;
}

.history-item-thumb svg {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
}

/* 動画サムネの再生アイコン */
.history-item-thumb.is-video {
    position: relative;
}

.history-item-thumb .thumb-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0.9;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.history-item:hover .history-item-thumb .thumb-play-icon {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.history-item-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.history-item-btn {
    padding: 0.5rem 0.875rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.history-item-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 195, 247, 0.05);
}

.history-item-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.history-clear-all {
    margin-top: 1rem;
    text-align: center;
}

.history-clear-all button {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: color var(--transition);
}

.history-clear-all button:hover {
    color: var(--danger);
}

/* ========== フッター ========== */
.front-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-user {
    color: var(--text);
    font-size: 0.85rem;
}

.footer-user i {
    color: var(--accent);
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.footer-legal a {
    color: var(--text-dim);
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: var(--accent);
}

.footer-legal-sep {
    color: var(--border);
    font-size: 0.625rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-copy p {
    margin: 0;
    line-height: 1.6;
}

/* テーマ切り替え（展開版） */
.theme-switcher-expanded {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: var(--bg-darker);
    border-radius: 24px;
    margin-bottom: 1rem;
}

.theme-auto-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-auto-btn i,
.theme-auto-btn svg {
    width: 14px;
    height: 14px;
    font-size: 0.85rem;
}

.theme-auto-btn:hover {
    color: var(--text);
}

.theme-auto-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 0.9rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.7;
}

.theme-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.theme-btn.active {
    border-color: var(--accent);
    opacity: 1;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 12px var(--accent);
}

/* 旧テーマスイッチャー（互換性用） */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem;
    background: var(--bg-darker);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ========== ダウンロードページ ========== */
.download-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-image:
        radial-gradient(ellipse at top, var(--bg-gradient-1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, var(--bg-gradient-2) 0%, transparent 50%);
}

/* ダウンロードページ用コンテナ（フロントと同じ幅） */
.download-container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ダウンロードページ内フッター */
.download-container .front-footer {
    width: 100%;
    margin-top: 2rem;
}

.download-logo {
    margin-bottom: 2rem;
}

.download-logo img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(79, 195, 247, 0.4));
    border: none;
    outline: none;
}

.download-logo a {
    display: block;
}

.download-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(79, 195, 247, 0.5);
    letter-spacing: 0.1em;
}

.download-logo-text a {
    color: inherit;
    text-decoration: none;
}

.download-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(79, 195, 247, 0.05);
}

.download-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #fca5a5;
    text-align: center;
}

.download-file-info {
    margin-bottom: 1.5rem;
}

.download-filename {
    font-size: 1.25rem;
    font-weight: 700;
    word-break: break-all;
    margin-bottom: 1rem;
    color: var(--text);
}

.download-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.download-meta-item {
    background: rgba(79, 195, 247, 0.05);
    border-radius: var(--radius);
    padding: 0.875rem;
}

.download-meta-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.download-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.download-remaining {
    margin-top: 1rem;
    padding: 0.875rem;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--accent-glow);
    text-align: center;
}

.download-password-form {
    margin-top: 1.5rem;
}

.download-password-form .form-group {
    margin-bottom: 1rem;
}

.download-password-form .form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.download-password-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    transition: all var(--transition);
}

.download-password-form .form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.15);
}

/* オーナー用パスワードスキップ */
.owner-skip-form {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.owner-skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.owner-skip-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}

.owner-skip-note {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 195, 247, 0.4);
    color: white;
}

.download-btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    font-size: 1.1rem;
    padding: 1.125rem 1.5rem;
}

.download-btn-success:hover {
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
}

.download-btn svg {
    width: 24px;
    height: 24px;
}

.download-no-code {
    text-align: center;
    color: var(--text-dim);
}

.download-no-code p {
    margin-bottom: 1.5rem;
}

/* ========== ファイルプレビュー ========== */
.download-preview {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* 画像プレビューコンテナ */
.preview-image-container {
    position: relative;
    max-width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.preview-image {
    display: block;
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.02);
}

.preview-expand-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.preview-expand-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

/* 大きな拡張子バッジ（非画像ファイル用） */
.preview-badge-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 20px;
    font-weight: 700;
    position: relative;
    transition: all 0.3s ease;
}

.preview-badge-large i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.preview-badge-large .preview-badge-ext {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* パスワード保護：専用ロックバッジ */
.preview-lock-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.35);
}

/* パスワードロックアイコン（バッジ右上） */
.preview-badge-lock {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--warning);
}

/* カテゴリ別カラー（大きなバッジ） */
.preview-badge-large[data-category="image"] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.preview-badge-large[data-category="video"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.preview-badge-large[data-category="audio"] {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}

.preview-badge-large[data-category="archive"] {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
}

.preview-badge-large[data-category="document"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.preview-badge-large[data-category="code"] {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.preview-badge-large[data-category="other"] {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 8px 24px rgba(107, 114, 128, 0.4);
}

.preview-badge-large:hover {
    transform: scale(1.05);
}

/* ========== PDF サムネイルプレビュー ========== */
.pdf-thumb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1rem;
}

.pdf-thumb-container .preview-badge-large {
    margin-bottom: 0;
}

.pdf-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pdf-open-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pdf-open-btn i {
    font-size: 0.85rem;
}

/* ========== 動画プレイヤー ========== */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16 / 9;
}

.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    z-index: 1;
}

.video-player-container.playing video {
    opacity: 1;
}

/* ポスター（初期表示） */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    cursor: pointer;
    z-index: 2;
}

.video-poster.hidden {
    display: none;
}

.video-poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

.video-big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 30px rgba(239, 68, 68, 0.5),
        0 0 60px rgba(239, 68, 68, 0.2);
}

.video-big-play-btn i {
    margin-left: 4px; /* 再生アイコンを中央に見えるよう微調整 */
}

.video-big-play-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 12px 40px rgba(239, 68, 68, 0.6),
        0 0 80px rgba(239, 68, 68, 0.3);
}

.video-big-play-btn:active {
    transform: scale(1.05);
}

.video-poster-duration {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* コントロールバー */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3;
}

.video-controls.visible {
    opacity: 1;
    visibility: visible;
}

.video-player-container:hover .video-controls {
    opacity: 1;
    visibility: visible;
}

/* プログレスバー */
.video-progress {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 0.75rem;
    overflow: visible;
}

.video-progress:hover {
    height: 7px;
}

.video-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: width 0.1s;
}

.video-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f87171);
    border-radius: 3px;
    transition: width 0.1s;
}

.video-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-progress:hover .video-progress-thumb,
.video-player-container.playing .video-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* コントロールボタン群 */
.video-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-controls-left,
.video-controls-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* 時間表示 */
.video-time {
    font-size: 0.85rem;
    color: white;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-time-sep {
    color: rgba(255, 255, 255, 0.5);
}

/* 音量スライダー */
.video-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.video-volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.video-volume-wrapper:hover .video-volume-slider-container {
    width: 80px;
    margin-left: 0.25rem;
}

.video-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.video-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
}

.video-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
}

/* ローディング */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 4;
}

.video-loading.active {
    display: block;
}

.video-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* フルスクリーン時 */
.video-player-container.fullscreen {
    border-radius: 0;
    max-width: none;
    width: 100vw;
    height: 100vh;
    aspect-ratio: unset;
}

.video-player-container.fullscreen video {
    object-fit: contain;
}

.video-player-container.fullscreen .video-big-play-btn {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.video-player-container.fullscreen .video-controls {
    padding: 1rem 1.5rem;
}

.video-player-container.fullscreen .video-progress {
    height: 6px;
}

.video-player-container.fullscreen .video-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

/* カーソル非表示（フルスクリーン再生時） */
.video-player-container.fullscreen.playing:not(.controls-visible) {
    cursor: none;
}

/* ========== オーディオプレイヤー ========== */
.audio-player-container {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
}

/* 波形ビジュアライザー */
.audio-visualizer {
    position: relative;
    width: 100%;
    height: 100px;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    overflow: visible;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.audio-visualizer:hover {
    transform: scaleY(1.05);
}

.audio-waveform {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: filter 0.2s ease;
}

.audio-visualizer:hover .audio-waveform {
    filter: brightness(1.1);
}

.audio-progress-overlay {
    display: none;
}

.audio-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: white;
    box-shadow: 0 0 15px var(--accent), 0 0 8px var(--accent), 0 0 3px white;
    pointer-events: none;
    transition: left 0.05s linear;
    border-radius: 2px;
}

.audio-time-tooltip {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.7rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.audio-visualizer:hover .audio-time-tooltip {
    opacity: 1;
}

/* オーディオ読み込み中オーバーレイ */
.audio-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.audio-loading-overlay.visible {
    opacity: 1;
}

/* 3ドットバウンスアニメーション */
.audio-loading-spinner {
    display: flex;
    gap: 6px;
    align-items: center;
}

.audio-loading-spinner > div {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent, #4FC3F7);
    animation: audioLoadingBounce 1.2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent, #4FC3F7);
}

.audio-loading-spinner > div:nth-child(2) {
    animation-delay: 0.15s;
}

.audio-loading-spinner > div:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes audioLoadingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

/* アルバムアート風アイコン */
.audio-artwork {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.25rem;
}

.audio-artwork-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: transform 0.3s ease;
}

.audio-player-container.playing .audio-artwork-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* 回転するリング */
.audio-artwork-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.audio-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0.3;
}

.audio-ring-1 {
    width: 85px;
    height: 85px;
    margin: -42.5px 0 0 -42.5px;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
}

.audio-ring-2 {
    width: 95px;
    height: 95px;
    margin: -47.5px 0 0 -47.5px;
    border-bottom-color: var(--accent-glow);
    border-left-color: var(--accent-glow);
}

.audio-ring-3 {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    border-top-color: var(--accent-dark);
}

.audio-player-container.playing .audio-ring-1 {
    animation: spinRing 3s linear infinite;
}

.audio-player-container.playing .audio-ring-2 {
    animation: spinRing 4s linear infinite reverse;
}

.audio-player-container.playing .audio-ring-3 {
    animation: spinRing 5s linear infinite;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

/* プログレスバー */
.audio-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0.75rem;
    overflow: visible;
}

.audio-progress-bar:hover {
    height: 10px;
}

.audio-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: width 0.1s;
}

.audio-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    border-radius: 4px;
    transition: width 0.1s;
}

.audio-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background: var(--accent-glow);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent);
}

.audio-progress-bar:hover .audio-progress-thumb,
.audio-player-container.playing .audio-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* 時間表示 */
.audio-time-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.audio-time-separator {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* コントロールエリア */
.audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* メインコントロール */
.audio-main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.audio-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.audio-btn-play {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25),
                0 0 30px rgba(var(--accent-rgb, 79, 195, 247), 0.4);
    position: relative;
}

.audio-btn-play::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    transition: all 0.3s;
}

.audio-btn-play::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    transition: all 0.3s;
}

.audio-player-container.playing .audio-btn-play::before {
    opacity: 0.6;
    animation: pulseRing1 1.5s ease-out infinite;
}

.audio-player-container.playing .audio-btn-play::after {
    opacity: 0.3;
    animation: pulseRing2 1.5s ease-out infinite 0.3s;
}

@keyframes pulseRing1 {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes pulseRing2 {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.5); opacity: 0; }
}

.audio-btn-play:hover {
    color: white;
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(var(--accent-rgb, 79, 195, 247), 0.5);
}

.audio-btn-play i {
    margin-left: 4px;
}

.audio-player-container.playing .audio-btn-play i {
    margin-left: 0;
}

.audio-btn-skip {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.audio-btn-skip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb, 79, 195, 247), 0.3);
}

/* 音量コントロール */
.audio-volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
}

.audio-btn-volume {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.audio-btn-volume:hover {
    color: var(--accent);
}

.audio-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    margin-right: 8px;
}

.audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: -5px;
}

.audio-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 14px var(--accent), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.audio-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--accent), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.audio-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.audio-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

/* レスポンシブ */
@media (max-width: 600px) {
    .audio-player-container {
        padding: 0.875rem;
    }

    .audio-visualizer {
        height: 70px;
    }

    .audio-btn-play {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .audio-btn-skip {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .audio-volume-control {
        padding: 0.4rem 0.6rem;
    }

    .audio-volume-slider {
        width: 70px;
    }

    .audio-main-controls {
        gap: 1rem;
    }
}

/* ========== PDFビューア ========== */
.pdf-viewer-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.pdf-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.pdf-viewer-fallback {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.5);
}

.pdf-viewer-fallback i {
    font-size: 3rem;
    color: var(--accent);
}

.pdf-viewer-fallback p {
    font-size: 1rem;
    margin: 0;
}

.pdf-fallback-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pdf-fallback-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* PDF非対応ブラウザ用フォールバック表示 */
@supports not ((-webkit-overflow-scrolling: touch)) {
    /* iOS以外のブラウザでiframeが空の場合のフォールバック */
}

/* レスポンシブ */
@media (max-width: 600px) {
    .pdf-viewer-container {
        height: 400px;
        border-radius: 8px;
    }
}

/* ========== ライトボックス（画像拡大モーダル） ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========== アルバム / ギャラリー ========== */

/* アルバムモードのダウンロードカード（幅拡大） */
.download-card.album-mode {
    max-width: 720px;
}

/* アルバム情報ヘッダー */
.album-info-header {
    margin-bottom: 1.5rem;
}

.album-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.album-title i {
    color: var(--accent);
}

.album-stats {
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* ギャラリーグリッド */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(79, 195, 247, 0.15);
}

/* サムネイル画像 */
.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

/* ファイルタイプバッジ（非画像用） */
.gallery-badge {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    padding: 0.75rem;
}

.gallery-badge i {
    font-size: 2rem;
    opacity: 0.9;
}

.gallery-badge .gallery-badge-ext {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* バッジカテゴリ別カラー */
.gallery-badge[data-category="video"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.gallery-badge[data-category="audio"] {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}

.gallery-badge[data-category="document"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.gallery-badge[data-category="archive"] {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.gallery-badge[data-category="code"] {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.gallery-badge[data-category="other"] {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* 動画再生オーバーレイ */
.gallery-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.gallery-play-overlay i {
    margin-left: 2px;
}

.gallery-item:hover .gallery-play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ギャラリーアイテム個別DLボタン */
.gallery-item-dl {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.gallery-item:hover .gallery-item-dl {
    opacity: 1;
}

.gallery-item-dl:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.15);
}

/* ZIP大容量警告 */
.album-zip-warning {
    text-align: center;
    font-size: 0.8rem;
    color: var(--warning, #f59e0b);
    padding: 0.5rem 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: var(--radius);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.album-zip-warning i {
    margin-right: 0.375rem;
}

/* ギャラリーアイテムオーバーレイ（ホバー情報） */
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.625rem 0.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-name {
    font-size: 0.7rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.gallery-item-size {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== アルバム コンパクトプレイヤー ========== */
.album-audio-section {
    margin-bottom: 1.5rem;
}

.compact-player {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0.75rem 1rem 0.625rem;
}

.compact-player-title {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 0.5rem;
}

.compact-player-title i {
    margin-right: 0.25rem;
    font-size: 0.55rem;
}

/* 波形バー — 薄く低く */
.compact-player-wave {
    position: relative;
    height: 40px;
    cursor: pointer;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.compact-player-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.compact-player-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    left: 0;
    pointer-events: none;
    box-shadow: 0 0 6px var(--accent);
    transition: left 0.05s linear;
}

/* コントロール — 1行 */
.compact-player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-player-left {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

.compact-player-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.compact-player-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.compact-player-btn-play {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    background: var(--accent);
    color: white;
}

.compact-player-btn-play:hover {
    background: var(--accent);
    filter: brightness(1.2);
    color: white;
    transform: scale(1.08);
}

/* 曲名 — 中央で省略 */
.compact-player-track {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    padding: 0 0.25rem;
}

/* 右側: 時間 + 音量 */
.compact-player-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.compact-player-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.compact-player-time-sep {
    margin: 0 0.1rem;
    opacity: 0.5;
}

.compact-player-btn-vol {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
}

.compact-player-vol {
    width: 50px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.compact-player-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.compact-player-vol::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

/* プレイリスト */
.album-playlist {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.album-playlist::-webkit-scrollbar {
    width: 4px;
}

.album-playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.album-playlist-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.5rem 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.album-playlist-header i {
    margin-right: 0.3rem;
    font-size: 0.6rem;
}

.album-playlist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

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

.album-playlist-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.album-playlist-item.active {
    background: rgba(var(--accent-rgb, 79, 195, 247), 0.1);
}

.album-playlist-item.active .album-playlist-name {
    color: var(--accent);
}

.album-playlist-num {
    width: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    flex-shrink: 0;
}

.album-playlist-playing {
    display: none;
    width: 1.5rem;
    text-align: center;
    font-size: 0.7rem;
    color: var(--accent);
    flex-shrink: 0;
    animation: playlistPulse 1.5s ease-in-out infinite;
}

.album-playlist-item.active .album-playlist-num {
    display: none;
}

.album-playlist-item.active .album-playlist-playing {
    display: block;
}

@keyframes playlistPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.album-playlist-info {
    flex: 1;
    min-width: 0;
}

.album-playlist-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.album-playlist-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.album-playlist-ext {
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.album-playlist-dl {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    opacity: 0;
    transition: all 0.2s ease;
}

.album-playlist-item:hover .album-playlist-dl {
    opacity: 1;
}

.album-playlist-dl:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.1);
}

/* アルバムアクション */
.album-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.album-dl-zip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--success), #16a34a);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-dl-zip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
    color: white;
}

.album-dl-zip-btn i {
    font-size: 1.1rem;
}

/* ========== アルバムライトボックス ========== */
.album-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10000;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(12px);
}

.album-lightbox.active {
    display: flex;
}

/* ライトボックスヘッダー */
.album-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    z-index: 2;
}

.album-lightbox-counter {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.album-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.album-lightbox-dl {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.album-lightbox-dl:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.album-lightbox-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.album-lightbox-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    transform: scale(1.1);
}

/* ナビゲーションボタン */
.album-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.album-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.album-lightbox-nav.prev {
    left: 1rem;
}

.album-lightbox-nav.next {
    right: 1rem;
}

/* ライトボックスコンテンツ */
.album-lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 4rem;
    overflow: hidden;
    position: relative;
}

/* ライトボックス内の画像 */
.album-lb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.25s ease;
}

/* ライトボックス内の動画 */
.album-lb-video {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* ライトボックス内のオーディオ */
.album-lb-audio-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    text-align: center;
}

.album-lb-audio-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.album-lb-audio {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    height: 40px;
}

/* ライトボックス内のPDF */
.album-lb-pdf {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    border: none;
    border-radius: var(--radius-lg);
    background: white;
}

/* ライトボックス内の汎用ファイル */
.album-lb-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    text-align: center;
}

.album-lb-file i {
    font-size: 4rem;
    color: var(--text-dim);
}

.album-lb-file-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

/* ライトボックス情報バー */
.album-lightbox-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    z-index: 2;
}

.album-lightbox-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.album-lightbox-size {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* アルバム履歴バッジ */
.history-ext-badge[data-category="album"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

/* ========== レスポンシブ ========== */
@media (max-width: 600px) {
    .front-container {
        padding: 1.5rem 1rem 3rem;
    }

    .front-logo img {
        max-width: 220px;
    }

    .front-logo-text {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .front-dropzone {
        padding: 2.5rem 1.5rem;
    }

    .front-dropzone-icon {
        width: 60px;
        height: 60px;
    }

    /* スマホ：ミニドロップゾーン（追加ボタンとして機能） */
    .front-dropzone.mini {
        padding: 0.875rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .front-dropzone.mini .front-dropzone-icon {
        width: 18px;
        height: 18px;
    }

    .front-dropzone.mini .front-dropzone-text {
        font-size: 0.8rem;
    }

    .history-item-actions {
        flex-direction: column;
    }

    .download-meta {
        grid-template-columns: 1fr;
    }

    .download-meta-item {
        padding: 0.625rem 0.75rem;
    }

    .download-filename {
        font-size: 1.1rem;
    }

    .download-logo img {
        max-width: 160px;
    }

    /* プレビュー */
    .preview-badge-large {
        width: 100px;
        height: 100px;
    }

    .preview-badge-large i {
        font-size: 2rem;
    }

    .preview-image {
        max-height: 200px;
    }

    /* ライトボックス */
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }

    /* 動画プレイヤー */
    .video-big-play-btn {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .video-controls {
        padding: 0.5rem 0.75rem;
    }

    .video-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .video-time {
        font-size: 0.75rem;
    }

    .video-volume-wrapper:hover .video-volume-slider-container {
        width: 60px;
    }

    .video-poster-duration {
        bottom: 10px;
        right: 10px;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* ダウンロードカード モバイル */
    .download-container {
        padding: 1.5rem 0.75rem 3rem;
    }

    .download-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .download-card.album-mode {
        padding: 1.25rem 0.875rem;
    }

    /* ギャラリー */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .gallery-badge i {
        font-size: 1.5rem;
    }

    .gallery-play-overlay {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .gallery-item-dl {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
        opacity: 1;
    }

    /* コンパクトプレイヤー モバイル */
    .compact-player {
        padding: 0.625rem 0.75rem 0.5rem;
    }

    .compact-player-wave {
        height: 32px;
    }

    .compact-player-vol {
        display: none;
    }

    .compact-player-track {
        font-size: 0.7rem;
    }

    /* プレイリスト モバイル */
    .album-playlist {
        max-height: 240px;
    }

    .album-playlist-item {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .album-playlist-dl {
        opacity: 1;
        width: 28px;
        height: 28px;
    }

    /* アルバムライトボックス */
    .album-lightbox-content {
        padding: 0.5rem 3rem;
    }

    .album-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .album-lightbox-nav.prev {
        left: 0.375rem;
    }

    .album-lightbox-nav.next {
        right: 0.375rem;
    }

    .album-lightbox-header {
        padding: 0.5rem 0.75rem;
    }

    .album-lightbox-info {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .album-lb-audio-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .album-lb-pdf {
        height: 60vh;
    }
}
