@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

html, body {
    color: #9c9c9c;
    background: #131313;
    font-family: 'Poppins', sans-serif;
}

nav.navbar {
    background: #131313 !important;
}

div.sidebar {
    background: #101010;
    border-right: 1px solid #252525;
}

.topbar {
    background: #101010;
    border-bottom: 1px solid #252525;
}

.topbar .dropdown-menu {
    margin-top: 0.5rem;
}

.nav-underline {
    border-bottom: 1px solid #252525;
}

.nav-underline .nav-link {
    color: #b6b6b6;
    border: none;
    padding: 10px 15px;
}

.nav-underline .nav-link.active {
    color: #ffffff;
    font-weight: normal;
    border-bottom: 1px solid #8956FB;
}

div.card {
    color: #b6b6b6;
    background: #1a1a1a;
    border: 1px solid #252525;
    margin-bottom: 10px;
    border-radius: 0;
}

.border-secondary {
    border-color: #252525 !important;
}

.card-header,
.card-footer {
    border-color: #252525 !important;
}

/*---------------------------------------------
    Text Elements
---------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
    color: #e0e0e0;
    font-weight: 600;
}

/*---------------------------------------------
    Buttons & Miscellaneous
---------------------------------------------*/
.btn-primary {
    border-radius: 0;
    padding: 10px 1.5rem;
    font-weight: 400;
    background: #8956FB;
    border: 0;
    align-self: flex-start;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:focus,
.btn-primary.show,
.btn-primary:focus-visible {
    background: #6f40e8 !important;
    border-color: #6f40e8 !important;
    box-shadow: none !important;
    outline: none !important;
}

.btn-secondary {
    border-radius: 0;
    border: 1px solid #252525;
    padding: 10px 1.5rem;
    background: #222222;
    box-sizing: border-box;
    align-self: flex-start;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active,
.btn-secondary.show {
    background: #222222;
    border: 1px solid transparent
}

.sidebar-menu i.bi {
    margin-right: 0.5rem;
}

.panel-icon {
    width: 40px;
    height: 40px;
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid #252525;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.btn-panel {
    width: 40px;
    height: 40px;
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid #252525;
}

.btn-panel:hover,
.btn-panel:focus,
.btn-panel:active {
    color: #999999;
    background-color: transparent;
    border-color: #444444;
    box-shadow: none;
}

.btn-panel:disabled {
    opacity: 0.3;
}

.btn-cancel {
    background-color: transparent;
    border: 1px solid #252525;
    color: #999999;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: none;
}

.btn-cancel:hover,
.btn-cancel:focus,
.btn-cancel:active {
    background-color: transparent;
    border-color: #252525;
    color: #999999;
    box-shadow: none;
}

.btn-success {
    border-radius: 0;
}

/*---------------------------------------------
    Sidebar Accordion
---------------------------------------------*/

.sidebar-menu .list-group-item {
    background: transparent;
    color: #ffffff;
    padding: 15px;
    font-size: 0.95rem;
    border: 0;
}

.sidebar-menu button.list-group-item {
    text-align: left;
    width: 100%;
}

.sidebar-menu .list-group-item.active,
.sidebar-menu .list-group-item.active:hover {
    color: #ffffff !important;
    background: linear-gradient(90deg, transparent, rgba(145, 70, 255, 0.2));
    border: 0 !important;
    border-right: 3px solid #9146FF !important;
}

.sidebar-menu .list-group-item:hover {
    color: #ffffff !important;
    background: linear-gradient(90deg, transparent, rgba(145, 70, 255, 0.2));
    border: 0 !important;
    border-right: 3px solid #9146FF !important;
    color: #ffffff
}

.sidebar-menu .list-group-item:active {
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 15px !important;
    border: 0 !important;
    border-right: 3px solid #9146FF !important;
    outline: none !important;
    box-shadow: none !important;
}

.sidebar-menu .list-group-item:focus,
.sidebar-menu .list-group-item:focus-visible {
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 15px !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    z-index: auto !important;
}

.sidebar-menu .list-group-item.active:focus,
.sidebar-menu .list-group-item.active:focus-visible,
.sidebar-menu .list-group-item.active:active {
    background: linear-gradient(90deg, transparent, rgba(145, 70, 255, 0.2)) !important;
    padding: 15px !important;
    border: 0 !important;
    border-right: 3px solid #9146FF !important;
}
    
.transition-rotate {
    transition: transform 0.3s ease-in-out;
}

a[data-bs-toggle="collapse"]:not(.collapsed) .transition-rotate {
    transform: rotate(180deg);
}

/*---------------------------------------------
    Tables
---------------------------------------------*/
.table {
    color: #b6b6b6;
    --bs-table-bg: #1a1a1a;
    --bs-table-border-color: #252525;
}

.table thead {
    color: #b6b6b6;
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #252525;
    font-weight: normal;
}

.table thead th {
    font-weight: normal;
}

.table tbody tr {
    color: #b6b6b6;
    border-bottom: 1px solid #252525;
}

.table td {
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    background-color: #1a1a1a;
    color: #b6b6b6;
    border-bottom-color: #252525;
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: #222222;
    color: #e0e0e0;
}

/*---------------------------------------------
    Search Input
---------------------------------------------*/
.form-control {
    background-color: #1a1a1a;
    border: 1px solid #252525;
    color: #999999;
    border-radius: 0 !important;
}

.form-control:focus {
    background-color: #1a1a1a;
    border-color: #8956FB;
    color: #999999;
    box-shadow: none;
}

.form-control::placeholder {
    color: #666666;
}

.input-group-text {
    background-color: #1a1a1a;
    border: 1px solid #252525;
    border-right: 0;
    color: #999999;
    border-radius: 0 !important;
}

.input-group .form-control {
    border-left: 0;
    padding: 10px;
}

.input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(137, 86, 251, 0.25);
    border-radius: 0 !important;
}

.input-group:focus-within .input-group-text {
    border-color: #8956FB;
}

.input-group:focus-within .form-control {
    border-color: #8956FB;
}

.input-group {
    border-radius: 0 !important;
}

.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-radius: 0 !important;
}

.input-group > :first-child {
    border-radius: 0 !important;
}

.form-select {
    background-color: #1a1a1a;
    border: 1px solid #252525;
    color: #999999;
    padding: 10px 2.5rem 10px 1.5rem;
    border-radius: 0 !important;
    background-position: right 0.75rem center;
}

.form-select:focus {
    background-color: #1a1a1a;
    border-color: #8956FB;
    color: #999999;
    box-shadow: none;
}

input[type="number"],
input[type="text"] {
    padding: 10px 15px;
}

/*---------------------------------------------
    Button Groups
---------------------------------------------*/
.btn-outline-secondary {
    background-color: #1a1a1a;
    border-color: #252525;
    color: #999999;
    padding: 10px;
    border-radius: 0;
}

.btn-danger {
    border: 0;
    border-radius: 0;
    padding: 10px 1.5rem;
}

.btn-outline-secondary:hover {
    background-color: #222222;
    border-color: #252525;
    color: #e0e0e0;
}

.btn-outline-secondary.active,
.btn-outline-secondary:active {
    background-color: #8956FB;
    border-color: #8956FB;
    color: #ffffff;
}

.btn-outline-secondary:focus {
    box-shadow: none;
}

/*---------------------------------------------
    Form Switches
---------------------------------------------*/
.form-check-input:checked {
    background-color: #8956fb;
    border-color: #8956fb;
}

.form-check-input:focus {
    border-color: #8956fb;
    box-shadow: 0 0 0 0.25rem rgba(137, 86, 251, 0.25);
}

/*---------------------------------------------
    Dropdowns
---------------------------------------------*/
.table-responsive {
    overflow: visible !important;
}

.dropdown-menu {
    background-color: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 0;
}

.dropdown-item {
    color: #b6b6b6;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #222222;
    color: #e0e0e0;
}

/*---------------------------------------------
    Modals
---------------------------------------------*/
.modal-content {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 0;
}

.modal-header {
    border-bottom: 1px solid #252525;
}

.modal-title {
    color: #e0e0e0;
}

.modal-body {
    color: #b6b6b6;
}

.modal-body strong {
    color: #e0e0e0;
}

.modal-footer {
    border-top: 1px solid #252525;
}

/*---------------------------------------------
    Global Alerts
---------------------------------------------*/
#globalAlertContainer .alert {
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

#globalAlertContainer .alert.show {
    transform: translateY(0);
}

.alert-success {
    background: #198754;
    border: 0;
    color: #ffffff;
}

.alert-danger {
    background: #dc3545;
    border: 0;
    color: #ffffff;
}

/*---------------------------------------------
    Alerts
---------------------------------------------*/
.alert {
    border-radius: 0;
}
/*---------------------------------------------
    Song Request Queue Drag & Drop
---------------------------------------------*/
.queue-item {
    transition: all 0.2s ease;
}

.queue-item:hover {
    background: #222222;
}

.queue-item.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
}

.queue-item.drag-over {
    border-top: 2px solid #0d6efd !important;
}

.drag-handle {
    cursor: grab;
    user-select: none;
}

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

/*---------------------------------------------
    Song Request Player Controls
---------------------------------------------*/
.form-range {
    background: transparent;
}

.form-range::-webkit-slider-thumb {
    background: #0d6efd;
}

.form-range::-moz-range-thumb {
    background: #0d6efd;
}

/*---------------------------------------------
    Mobile Responsive Fixes
---------------------------------------------*/
@media (max-width: 768px) {
    .queue-item {
        padding: 0.75rem !important;
    }
    
    .queue-item .small {
        font-size: 0.8rem;
    }
    
    #volumeSlider {
        width: 80px !important;
    }
    
    #timeDisplay {
        font-size: 0.75rem;
    }
    
    .card-footer {
        padding: 0.75rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Hide volume label on very small screens */
    @media (max-width: 576px) {
        #volumeLabel {
            display: none;
        }
        
        #volumeSlider {
            width: 60px !important;
        }
    }
}

/* Prevent text selection during drag */
.queue-item.dragging * {
    pointer-events: none;
    user-select: none;
}

/* Better touch targets for mobile */
.btn-sm {
    min-width: 36px;
    min-height: 36px;
    padding: 10px 1.5rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid #333333;
}

/* Topbar User Button */
.btn-topbar-user {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e0e0e0;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-topbar-user:hover {
    background: #222222;
    border-color: #333333;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(137, 86, 251, 0.15);
}

.btn-topbar-user:focus,
.btn-topbar-user:active,
.btn-topbar-user.show {
    background: #252525;
    border-color: #8956FB;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(137, 86, 251, 0.25);
    outline: none;
}

.btn-topbar-user img {
    transition: transform 0.2s ease;
}

.btn-topbar-user:hover img {
    transform: scale(1.05);
}

/* Sidebar User Button (same style as topbar) */
.btn-sidebar-user {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e0e0e0;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-sidebar-user:hover {
    background: #222222;
    border-color: #333333;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(137, 86, 251, 0.15);
}

.btn-sidebar-user:focus,
.btn-sidebar-user:active,
.btn-sidebar-user.show {
    background: #252525;
    border-color: #8956FB;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(137, 86, 251, 0.25);
    outline: none;
}

.btn-sidebar-user img {
    transition: transform 0.2s ease;
}

.btn-sidebar-user:hover img {
    transform: scale(1.05);
}
