.text-box {
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.6);
    color: black;
    border-radius: 4px;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
    border: 2px solid rgb(53, 47, 108);
    box-shadow: 3px 3px 0px rgb(23, 17, 77);
    font-size: clamp(13px, 2vw, 15px);
    text-align: center;
    z-index: 200;
    opacity: 1;
    transition: opacity 0.3s ease-in-out, bottom 0.3s ease-in-out, box-shadow 0.2s ease;
}

#info-text {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.6);
    color: black;
    border-radius: 4px;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
    border: 2px solid rgb(53, 47, 108);
    box-shadow: 3px 3px 0px rgb(23, 17, 77);
    font-size: clamp(14px, 2.5vw, 18px);
    text-align: center;
    z-index: 200;
}

/* Enhanced Sidebar Styles for DJ Interface */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: rgba(123, 67, 148, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
    background: rgba(123, 67, 148, 1);
    transform: translateY(-50%) scale(1.1);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -450px;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(123, 67, 148, 0.95), rgba(53, 47, 108, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 300;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.current-track-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-track-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.8;
}

.current-track-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #7B4394;
}

.track-title {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 5px;
}

.track-artist {
    font-size: 0.9em;
    opacity: 0.7;
}

/* DJ Controls Section */
.dj-controls-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dj-controls-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.8;
}

.control-row {
    margin-bottom: 20px;
}

.control-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    opacity: 0.8;
}

.crossfader-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
}

.crossfader-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
}

.crossfader-indicator {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #7B4394;
    border-radius: 50%;
    transition: left 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.effects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.effect-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.effect-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.effect-item.active {
    border-color: #7B4394;
    background: rgba(123, 67, 148, 0.2);
}

.effect-icon {
    display: block;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.effect-name {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 3px;
}

.effect-status {
    font-size: 0.8em;
    opacity: 0.7;
}

.effect-item.active .effect-status {
    opacity: 1;
    color: #7B4394;
    font-weight: 500;
}

.import-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.import-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.8;
}

.import-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.import-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.url-import {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.url-input {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
}

.url-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.url-input:focus {
    outline: none;
    border-color: #7B4394;
    background: rgba(255, 255, 255, 0.15);
}

.playlist-section {
    padding: 20px;
    flex: 1;
    position: relative;
}

.playlist-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.8;
}

.playlist-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
}

.empty-playlist {
    text-align: center;
    opacity: 0.5;
    font-style: italic;
    padding: 20px;
}

.playlist-item {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.playlist-item.active {
    border-left-color: #7B4394;
    background: rgba(123, 67, 148, 0.2);
}

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

.playlist-item-title {
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-artist {
    font-size: 0.8em;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-controls {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.playlist-item:hover .playlist-item-controls {
    opacity: 1;
}

.playlist-item-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    transition: background 0.2s ease;
}

.playlist-item-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.drag-handle {
    cursor: grab;
    padding: 4px 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.6);
}

.playlist-item:hover .drag-handle {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Drag and Drop Styles */
.playlist-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.playlist-item.drag-over {
    background: rgba(123, 67, 148, 0.3);
    border-left-color: #7B4394;
}

.playlist-container.drag-active .playlist-item:not(.dragging) {
    transition: transform 0.2s ease;
}

.drop-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #7B4394;
    z-index: 1000;
    pointer-events: none;
}

.drop-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7B4394, transparent);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.playback-controls {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 15px;
}

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

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

.play-pause.playing {
    background: rgba(123, 67, 148, 0.8);
    border-color: #7B4394;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Gesture Help Section */
.gesture-help {
    width: 100%;
    margin-bottom: 1rem;
}

.gesture-help h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.8;
    text-align: center;
}

.gesture-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.gesture-icon {
    font-size: 1.5em;
    min-width: 30px;
    text-align: center;
    margin-top: 2px;
}

.gesture-text {
    flex: 1;
    font-size: 0.85em;
    line-height: 1.3;
}

.gesture-text strong {
    color: #7B4394;
    font-weight: 500;
}

.gesture-text small {
    opacity: 0.7;
    font-size: 0.9em;
}

#social-links, #coffee-link, #logo-container {
    position: static;
    margin: 0 auto;
}

#logo {
    font-size: 2em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100vw;
        left: -100vw;
    }
    
    .sidebar-toggle {
        left: 5px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .gesture-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .gesture-text {
        text-align: center;
    }
    
    .effects-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for active effects */
@keyframes effectPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.effect-item.active {
    animation: effectPulse 2s ease-in-out infinite;
}