:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --pad-bg: #2a2a2a;
    --pad-hover: #3a3a3a;
    --pad-active: #4CAF50;
    --accent-color: #00bcd4;
    --border-radius: 12px;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: var(--text-color);
    position: relative;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: var(--accent-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

h2 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.add-btn:hover {
    background-color: var(--accent-color);
    color: #121212;
}

.grid-container {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.bgm-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.pad-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.sound-item {
    background-color: var(--pad-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.sound-item:hover {
    background-color: var(--pad-hover);
}

@keyframes playing-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(76, 175, 80, 0.4); }
    50%       { box-shadow: 0 0 28px rgba(76, 175, 80, 0.8); }
}

.sound-item.playing {
    border-color: var(--pad-active);
    animation: playing-pulse 1.4s ease-in-out infinite;
}

/* プログレスバー */
.progress-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-wrap {
    flex: 1;
    height: 6px;
    background: #333;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-wrap:hover {
    height: 9px;
    transition: height 0.15s;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pad-active);
    border-radius: 3px;
    transition: width 0.25s linear;
    pointer-events: none;
}

.time-display {
    font-size: 0.78em;
    color: #888;
    white-space: nowrap;
    min-width: 78px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.file-input {
    font-size: 0.85rem;
    width: 100%;
    color: #aaa;
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    background-color: #444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #555;
}

.play-btn {
    background-color: #2e7d32;
    font-weight: bold;
}

.play-btn:hover {
    background-color: #388e3c;
}

.stop-btn {
    background-color: #c62828;
}

.stop-btn:hover {
    background-color: #d32f2f;
}

.active-btn {
    background-color: #f39c12 !important;
    color: #121212 !important;
    font-weight: bold;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    background-color: #222;
    padding: 8px 12px;
    border-radius: 20px;
}

input[type="range"] {
    flex: 1;
    cursor: pointer;
}

/* ポン出しパッド特有のスタイル */
.pad-item .play-btn {
    height: 70px;
    font-size: 1rem;
    white-space: nowrap;
}

.sound-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.sound-item.drag-over {
    border: 2px dashed var(--accent-color, #00bcd4);
    box-sizing: border-box;
}

/* セクションのドラッグ＆ドロップ用スタイル */
.section-dragging {
    opacity: 0.4;
    background-color: #2a2a2a;
    border-radius: 8px;
}

.section-drag-over {
    border-top: 4px dashed var(--accent-color, #00bcd4);
    padding-top: 10px;
}
