html, body {
    width: 100%;
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0d0d1a;
    color: #c9d1d9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    padding: 1rem;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding-left: 2rem;
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
    margin-bottom: 30px;
}

.botify-header {
    width: 50px;
    height: auto;
}

.header-title {
    font-size: 2rem;
    font-weight: bold;
}


.logo_botify {
    width: 250px;
    height: auto;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.hero {
    text-align: center;
    padding: 3rem 2rem;
    background: radial-gradient(circle, #1a1a2e 20%, #252540 80%);
    border-radius: 8px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.install-app-link {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.install-app-icon {
    cursor: pointer;
}

.install-app-link:hover {
    transform: scale(1.1);
}



.login-box {
    max-width: 400px;
    width: 90%;
    margin: 2rem auto;
    padding: 2rem;
    background: #252540;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    text-align: center;
    color: white;
}

.login-button {
    margin-top: 1rem; /* Ajoute un espace au-dessus du bouton */
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    transition: all 0.3s;
}

.login-button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: translateY(-2px);
}


.filter-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    justify-content: center;
    max-width: 400px; /* ✅ Empêche plus de 3 colonnes */
    margin: auto;
}

/* ✅ Boutons des dossiers */
.filter-button {
    width: 100%;
    height: 50px; /* ✅ Hauteur uniforme */
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ✅ Effet au survol */
.filter-button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: scale(1.05);
}

/* ✅ Effet lorsqu'on clique */
.filter-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.6);
}

.button-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

button {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(91, 33, 182, 0.8);
}

button:active {
    transform: scale(0.95);
}


/* Applique l'image de fond et floute l'arrière-plan */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


/* Pour s'assurer que la modal-content ne soit pas floutée */
.modal-content {
    background: rgba(34, 34, 68, 0.9); /* Légère transparence pour voir l'effet */
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    color: white;
    text-align: center;
}


.input-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre parfaitement les champs */
    width: 100%;
    max-width: 300px; /* Ajuste la largeur */
    text-align: center; /* Alignement du texte */
    margin-bottom: 0.5rem;
}


.input-group input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    text-align: center; /* Centre le texte à l'intérieur */
}

.password-field {
    width: 100%;
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    background: rgba(16, 33, 52, 0.9);
    color: #dbe7f3;
    box-shadow: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    transform: translateY(-50%);
    background: rgba(23, 46, 69, 0.95);
}


.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 90%;
    max-width: 800px;
    margin: 2rem;
    gap: 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
}

.container-folder-button{
    display: flex;
    flex-direction: row;
    gap: 5px;
}

#user-modal .modal-content {
    padding-bottom: 2rem; /* Augmente l'espace en bas */
}


#open-upload-modal, #open-user-modal {
    background-color: #7c3aed;
    color: white;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#open-upload-modal:hover {
    background-color: #5b21b6;
}

/* Modifier la taille de la modal pour qu'elle s'adapte mieux */
.upload-modal {
    text-align: center;
    border: 2px dashed #666;
    padding: 1rem; /* Réduction du padding */
    border-radius: 8px;
    background-color: #1a1a2e;
    color: white;
    width: 90%;
    max-width: 350px; /* Réduction de la largeur */
    max-height: 80vh; /* Empêcher la modal de dépasser */
}

/* Réduire les éléments internes de la modal */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem; /* Espacement réduit */
    padding: 1rem;
}

.upload-label, .upload-button {
    padding: 0.5rem 1rem; /* Réduction de la hauteur */
    font-size: 0.8rem; /* Réduction de la taille du texte */
    max-width: 250px;
}

#folder-select, #file-name {
    max-width: 250px;
    font-size: 0.8rem;
    padding: 0.5rem;
}


.upload-area p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.upload-area small {
    display: block;
    margin-bottom: 1rem;
    color: #bbb;
}

.upload-modal {
    text-align: center;
    border-radius: 12px;
    padding: 2.5rem;
    background: #222244;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px;
}

/* Cache l'input file par défaut */

#file-input {
    display: block !important;
    opacity: 0; /* Garde invisible mais toujours cliquable */
    position: absolute; /* Permet d'être sous le label */
    width: 10%;
    height: 10%;
    cursor: pointer;
}

/* Crée un bouton stylé pour uploader un fichier */
.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

/* Icône du bouton */
.upload-label::before {
    content: "📂";
    font-size: 1.2rem;
}

/* Effet au survol */
.upload-label:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: translateY(-2px);
}

/* Effet lors du clic */
.upload-label:active {
    transform: scale(0.95);
}

/* Style du texte affichant le nom du fichier sélectionné */
#file-name-display {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #c9d1d9;
    text-align: center;
}

/* Styliser le champ de sélection de dossier */
#folder-select {
    width: 100%;
    max-width: 300px;
    padding: 0.7rem;
    font-size: 1rem;
    border: 2px solid #7c3aed;
    border-radius: 8px;
    background-color: #1a1a2e;
    color: white;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: none; /* Supprime le style natif du select */
    -webkit-appearance: none; /* Pour Safari */
    -moz-appearance: none; /* Pour Firefox */
    cursor: pointer;
    padding-right: 2rem; /* Espace pour l'icône */
    position: relative;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

#folder-select:focus {
    border-color: #5b21b6;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

#folder-select option {
    background-color: #1a1a2e;
    color: white;
}


.upload-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.upload-button {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: translateY(-2px);
}


.audio-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    margin-top: 1rem;
}

.audio-table th, .audio-table td {
    border: 1px solid #c9d1d9;
    padding: 10px;
    text-align: left;
}

.audio-table th {
    background-color: #6200ea;
    color: white;
}

.audio-table td {
    background-color: #1a1a2e;
}

.audio-table button {
    background-color: #7c3aed;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.audio-table button:hover {
    background-color: #5b21b6;
}

.folder-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.folder-item {
    background-color: #252540;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.folder-item:hover {
    background-color: #5b21b6;
    transform: scale(1.05);
}

/* Assure que la croix est bien placée en haut à droite */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem; /* Taille du texte */
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, color 0.3s;
    z-index: 1050; /* Pour être au-dessus de la modal */
}

/* Effet au survol */
.close-button:hover {
    transform: scale(1.2);
    color: #ff4d4d;
}


/* Style global des boutons */
button, .upload-button, .login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* Centrer les boutons de connexion */
.login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Effet au survol */
button:hover, .upload-button:hover, .login-button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(91, 33, 182, 0.8);
}

/* Effet lors du clic */
button:active, .upload-button:active, .login-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.6);
}

/* Conteneur des boutons Retour et Stop (placé au-dessus de la grille) */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px; /* Espacement entre les boutons et la grille */
    width: 100%;
}

/* Grille pour les boutons audio uniquement */
.audio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Colonnes dynamiques */
    gap: 15px; /* Espacement plus homogène */
    width: 100%;
    max-width: 900px; /* Ajuste selon tes besoins */
    margin: auto;
    justify-content: center;
}


.audio-file-button {
    width: 100%; /* Prend toute la largeur disponible */
    aspect-ratio: 1 / 1; /* Garde toujours une forme carrée */
    font-size: clamp(10px, 2.5vw, 16px); /* Ajuste dynamiquement */
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    word-wrap: break-word;
    white-space: normal;
}



/* Effet au survol */
.audio-file-button:hover {
    background: linear-gradient(135deg, #5b21b6, #3a0ca3);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(91, 33, 182, 0.8);
}

/* Effet lors du clic */
.audio-file-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.6);
}

.audio-file {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.audio-file-button {
    position: relative;
    width: 150px;
    height: 150px;
    font-size: clamp(12px, 3vw, 18px); /* Ajuste automatiquement la taille du texte */
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    word-wrap: break-word; /* Permet au texte de passer à la ligne si besoin */
    white-space: normal; /* Autorise les retours à la ligne */
}


/* Positionne la croix en haut à droite du bouton */
/* Bouton de suppression simple sans cercle et sans effet */
.delete-button {
    position: absolute;
    top: 5%; /* Position relative en hauteur */
    right: 15%; /* Position relative en largeur */
    font-size: 0.8em; /* Taille du bouton relative à celle du parent */
    color: red;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Supprime les effets au survol */
.delete-button:hover {
    background: none;
    color: darkred; /* Optionnel : Légère variation au survol */
}


.control-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

footer {
    background: linear-gradient(135deg, #1a1a2e, #252540);
    padding: 15px;
    text-align: center;
    width: 100vw; /* ✅ Assure que le footer couvre toute la largeur */
    position: relative; /* Évite qu'il cache le contenu */
    margin-top: auto; /* Permet de pousser le footer en bas */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}



.new-folder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.9rem;
}

.new-folder-content button {
    background-color: #7c3aed;
    color: white;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.new-folder-content button:hover {
    background-color: #5b21b6;
    transform: scale(1.05);
}

.new-folder-content p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}





/* ========================= */
/* 📌 RESPONSIVE DESIGN */
/* ========================= */

@media (max-width: 768px) {
    /* ✅ Ajustement du header */
    header {
        padding: 0.8rem;
        flex-direction: row;
        justify-content: space-between;
    }

    .botify-header {
        width: 40px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .install-app-icon {
        font-size: 1.3rem;
    }

    /* ✅ Conteneurs */
    .container {
        width: 95%;
        padding: 1rem;
    }

    .filter-container {
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-width: 600px; /* ✅ Permet 3 colonnes sur grands écrans */
        grid-template-columns: repeat(3, 1fr);
    }

    .install-section {
        width: 100%;
        max-width: 500px;
    }

    /* ✅ Ajustement des boutons */
    button {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }

    .container-folder-button {
        flex-direction: column;
        align-items: center;
    }

    /* ✅ Ajout d'un affichage colonne pour les boutons */
    .button-container {
        flex-direction: column;
        align-items: center;
    }

    /* ✅ Ajustement des images */
    .logo_botify {
        width: 200px;
    }
}

/* ✅ Mode ultra-compact pour écrans < 480px */
@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* ✅ Ajustement des icônes */
    .install-app-icon {
        font-size: 1.2rem;
    }

    /* ✅ Taille des boutons */
    button {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    /* ✅ Modale ajustée pour petits écrans */
    .modal-content {
        width: 90%;
        max-width: 320px;
        padding: 1rem;
    }

    /* ✅ Tableaux et boutons plus compacts */
    .audio-table {
        font-size: 0.9rem;
    }

    .audio-file-button {
        font-size: 0.9rem;
    }
}
.audio-file {
    position: relative;
    display: inline-block;
    margin: 10px;
    padding: 15px;
    background-color: #6c2bd9;
    border-radius: 12px;
    width: 150px;
    height: 150px;
    color: white;
    font-size: 1rem;
    text-align: center;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.audio-file:hover {
    background-color: #7d40ea;
}

.delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    font-size: 16px;
    color: #ff4d4d;
    cursor: pointer;
    transition: transform 0.2s;
}

.delete-button:hover {
    transform: scale(1.2);
}

.discord-settings,
.discord-select {
    background: #1a1a2e;
    border: 2px solid #5b21b6;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.discord-settings h3,
.discord-select h3 {
    color: #c9d1d9;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-settings input,
.discord-select select {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem;
    border-radius: 8px;
    border: 2px solid #7c3aed;
    background-color: #0d0d1a;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s ease;
    box-shadow: inset 0 0 4px rgba(124, 58, 237, 0.2);
}

#save-discord-config {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

#config-message {
    font-size: 0.95rem;
    text-align: center;
    color: #bbb;
    min-height: 1.2rem;
}

.modal {
    display: none; /* masqué par défaut */
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}


.register-modal {
    background: #1e1e2f;
    padding: 30px;
    border-radius: 16px;
    width: 320px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
    animation: fadeIn 0.3s ease-out;
    color: white;
  }

.register-modal input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    background: #2a2a3d;
    color: white;
    font-size: 1rem;
}

.register-modal h2 {
    margin-top: 0;
    text-align: center;
    color: #a16eff;
}

.register-button {
    width: 100%;
    background: #7a50ff;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.register-button:hover {
    background: #9f76ff;
}

.register-message {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
}

.close-button {
    float: right;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

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

/* === Dashboard v2 === */
.header-actions {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 17, 31, 0.45);
    color: #fff;
    border-radius: 999px;
    min-width: 34px;
    min-height: 30px;
    line-height: 1;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0 8px;
}

.lang-btn.active {
    border-color: rgba(196, 181, 253, 0.9);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35);
}

.profile-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.9rem;
}

.dashboard-main {
    width: min(1100px, 94vw);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.panel {
    background: rgba(16, 30, 44, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-wide {
    grid-column: 1 / -1;
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel-title-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-panel .panel > h2 {
    width: 100%;
    text-align: center;
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 0 0 14px;
}

.tab-panel .panel .panel-title-row {
    position: relative;
    justify-content: flex-end;
    min-height: 42px;
}

.tab-panel .panel .panel-title-row h2 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    margin: 0;
    text-align: center;
    font-size: 1.45rem;
    line-height: 1.2;
    pointer-events: none;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: min(100%, 560px);
    margin-inline: auto;
}

.stack-form input,
.stack-form select {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 10px 12px;
    background: #0f1d2a;
    color: #e6edf3;
}

.stack-form label {
    width: 100%;
    text-align: left;
}

input[type="file"] {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 7px 8px;
    background: #0f1d2a;
    color: #e6edf3;
}

input[type="file"]::file-selector-button {
    border: 1px solid rgba(124, 58, 237, 0.45);
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    padding: 7px 12px;
    margin-right: 12px;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    border: 1px solid rgba(124, 58, 237, 0.45);
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    padding: 7px 12px;
    margin-right: 12px;
    cursor: pointer;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #a78bfa 50%),
        linear-gradient(135deg, #a78bfa 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

#sound-folder-filter,
#sound-folder-select,
#discord-config-select,
#streamdeck-config-select,
#streamdeck-sound-select {
    background-color: #0f1d2a;
    color: #e6edf3;
    border: 1px solid #2d3f52;
}

#sound-folder-filter option,
#sound-folder-select option,
#discord-config-select option,
#streamdeck-config-select option,
#streamdeck-sound-select option {
    background-color: #152638;
    color: #e6edf3;
}

.hint {
    color: #9fb3c8;
    font-size: 0.9rem;
}

.config-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.danger-outline {
    background: transparent;
    border: 1px solid #f87171;
    color: #fca5a5;
    box-shadow: none;
}

.danger-outline:hover {
    background: rgba(248, 113, 113, 0.14);
    transform: none;
    box-shadow: none;
}

.config-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 760px);
    margin-inline: auto;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.config-item:hover {
    transform: translateY(-2px);
    border-color: #3f6282;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.28);
}

.config-item > div {
    flex: 1;
    min-width: 0;
}

.config-item strong {
    display: block;
    margin: 0 0 5px;
    font-size: 1.02rem;
    line-height: 1.3;
}

.config-item small {
    display: block;
    color: #8fb2cc;
    font-size: 0.9rem;
    line-height: 1.35;
    word-break: break-word;
}

.config-item .danger-outline {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 9px;
    white-space: nowrap;
}

.config-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.config-item-actions button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    white-space: nowrap;
}

.config-share-badge {
    display: inline-block;
    margin-top: 6px;
    color: #c7d8ea;
    font-size: 0.84rem;
    border: 1px solid rgba(124, 58, 237, 0.28);
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(124, 58, 237, 0.1);
}

.panel-title-row {
    width: min(100%, 760px);
    margin-inline: auto;
}

.config-actions {
    justify-content: center;
}

.config-help-row {
    width: min(100%, 1040px);
    margin: 0 auto 8px;
    display: flex;
    justify-content: flex-end;
}

.subtle-help-btn {
    padding: 0.35rem 0.65rem;
    min-height: 30px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.28);
    background: rgba(15, 29, 42, 0.62);
    color: #c9d6e3;
    box-shadow: none;
}

.subtle-help-btn:hover {
    background: rgba(20, 39, 58, 0.78);
    border-color: rgba(124, 58, 237, 0.42);
    transform: translateY(-1px);
}

.sound-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    width: 100%;
}

.sound-grid.sound-list-minimal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sound-card {
    position: relative;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sound-card:hover {
    transform: translateY(-2px);
    border-color: #3f6282;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.28);
}

.sound-card h4 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

.sound-rename-trigger {
    cursor: pointer;
    transition: color 0.16s ease;
}

.sound-rename-trigger:hover {
    color: #c4b5fd;
}

.sound-card-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}

.sound-card-minimal .sound-card-minimal-head {
    min-width: 0;
    flex: 1;
}

.sound-card-minimal h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
}

.sound-card-minimal .sound-actions {
    margin-left: auto;
    flex-wrap: nowrap;
}

.sound-card-minimal .sound-actions button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    overflow: visible;
}

.sound-card-minimal .sound-actions button i {
    font-size: 0.95rem;
}

.sound-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding-right: 28px;
}

.sound-meta {
    margin: 10px 0;
    color: #8fb2cc;
    font-size: 0.9rem;
}

.sound-folder-label {
    margin: 8px 0 0;
    display: inline-block;
    font-size: 0.8rem;
    color: #d8b4fe;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: 999px;
    padding: 3px 10px;
}

.sound-share-label {
    margin: 8px 0 0;
    font-size: 0.84rem;
    color: #9fc5dd;
}

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

.sound-actions button {
    flex: 0 0 auto;
    min-height: 40px;
}

.icon-only-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.45);
    background: linear-gradient(135deg, #23384f, #1a2d42);
    overflow: visible;
}

.icon-only-btn:hover {
    background: linear-gradient(135deg, #2a4662, #20394f);
}

.icon-only-btn .fa-star {
    color: #facc15;
}

.icon-only-btn[title]::after,
.icon-only-btn[title]::before,
.sound-kebab-btn[title]::after,
.sound-kebab-btn[title]::before {
    position: absolute;
    left: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 40;
}

.icon-only-btn[title]::after,
.sound-kebab-btn[title]::after {
    content: attr(title);
    bottom: calc(100% + 10px);
    transform: translate(-50%, 4px);
    max-width: 220px;
    white-space: nowrap;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.45);
    background: rgba(9, 18, 30, 0.96);
    color: #e9eff6;
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 6px 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.icon-only-btn[title]::before,
.sound-kebab-btn[title]::before {
    content: '';
    bottom: calc(100% + 4px);
    transform: translate(-50%, 4px);
    width: 8px;
    height: 8px;
    background: rgba(9, 18, 30, 0.96);
    border-right: 1px solid rgba(124, 58, 237, 0.45);
    border-bottom: 1px solid rgba(124, 58, 237, 0.45);
    rotate: 45deg;
}

.icon-only-btn[title]:hover::after,
.icon-only-btn[title]:hover::before,
.icon-only-btn[title]:focus-visible::after,
.icon-only-btn[title]:focus-visible::before,
.icon-only-btn[title]:active::after,
.icon-only-btn[title]:active::before,
.sound-kebab-btn[title]:hover::after,
.sound-kebab-btn[title]:hover::before,
.sound-kebab-btn[title]:focus-visible::after,
.sound-kebab-btn[title]:focus-visible::before,
.sound-kebab-btn[title]:active::after,
.sound-kebab-btn[title]:active::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

#sound-favorites-filter {
    margin-left: 2px;
}

#sound-favorites-filter.active {
    border-color: rgba(250, 204, 21, 0.85);
    background: linear-gradient(135deg, #3d3008, #2a2208);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.15);
}

#sound-favorites-filter.active .fa-star {
    color: #fde047;
}

#sound-shared-alias-filter.active {
    border-color: rgba(56, 189, 248, 0.85);
    background: linear-gradient(135deg, #0e3140, #0a2631);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16);
}

#sound-shared-alias-filter.active .fa-link {
    color: #7dd3fc;
}

#sound-view-toggle.active {
    border-color: rgba(96, 165, 250, 0.8);
    background: linear-gradient(135deg, #1f3550, #12263c);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}

.local-preview-btn.active {
    border-color: rgba(34, 197, 94, 0.8);
    background: linear-gradient(135deg, #103927, #0f2d20);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.sound-delete-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(220, 38, 38, 0.6);
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sound-delete-icon:hover {
    background: rgba(220, 38, 38, 0.25);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.9);
}

.sound-move-row {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(11, 24, 38, 0.75);
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 10px;
    padding: 8px;
}

.sound-move-row select {
    flex: 1;
    min-width: 0;
    height: 40px;
    border-radius: 9px;
    border: 1px solid #385472;
    background-color: #102134;
    color: #e9eff6;
    font-weight: 600;
    padding: 0 38px 0 12px;
    background-image:
        linear-gradient(45deg, transparent 50%, #c4b5fd 50%),
        linear-gradient(135deg, #c4b5fd 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.sound-move-row select:hover {
    border-color: #53769c;
    background-color: #12263d;
}

.sound-move-row select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.sound-move-row button {
    white-space: nowrap;
    height: 40px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid rgba(124, 58, 237, 0.45);
}

.sound-move-row .sound-move-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#sound-folder-filter,
#sound-folder-select,
#discord-config-select,
#streamdeck-config-select,
#streamdeck-sound-select {
    width: min(100%, 760px);
    max-width: 100%;
    display: block;
    margin-inline: auto;
    height: 40px;
    border-radius: 9px;
    border: 1px solid #385472;
    background-color: #102134;
    color: #e9eff6;
    font-weight: 600;
    padding: 0 38px 0 12px;
    background-image:
        linear-gradient(45deg, transparent 50%, #c4b5fd 50%),
        linear-gradient(135deg, #c4b5fd 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#sound-folder-filter {
    width: min(100%, 420px);
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 36px 0 12px;
    font-size: 0.95rem;
    line-height: 1.2;
}

#sound-folder-filter:hover,
#sound-folder-select:hover,
#discord-config-select:hover,
#streamdeck-config-select:hover,
#streamdeck-sound-select:hover {
    border-color: #53769c;
    background-color: #12263d;
}

#sound-folder-filter:focus,
#sound-folder-select:focus,
#discord-config-select:focus,
#streamdeck-config-select:focus,
#streamdeck-sound-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

#tab-sounds > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-configs > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-shared-sounds > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-queue > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-history > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-streamdeck > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-admin > .panel {
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
}

#tab-configs > .panel > h2,
#tab-configs > .panel > #config-form,
#tab-configs > .panel > label[for="discord-config-select"],
#tab-configs > .panel > #discord-config-select,
#tab-configs > .panel > .config-actions,
#tab-configs > .panel > #discord-config-list {
    width: min(100%, 1040px);
    margin-inline: auto;
}

#tab-shared-sounds > .panel > .panel-title-row,
#tab-shared-sounds > .panel > #shared-sound-empty,
#tab-shared-sounds > .panel > #shared-sound-list {
    width: min(100%, 1040px);
    margin-inline: auto;
}

#tab-queue > .panel > .panel-title-row,
#tab-queue > .panel > #queue-status,
#tab-queue > .panel > .queue-controls,
#tab-queue > .panel > #queue-vote-status,
#tab-queue > .panel > #queue-empty,
#tab-queue > .panel > #queue-list {
    width: min(100%, 1040px);
    margin-inline: auto;
}

#tab-queue > .panel > .panel-title-row {
    align-items: flex-start;
    min-height: 88px;
}

#tab-queue > .panel > .panel-title-row .panel-title-actions {
    margin-top: 30px;
}

#tab-history > .panel > .panel-title-row,
#tab-history > .panel > #history-empty,
#tab-history > .panel > #history-list {
    width: min(100%, 1040px);
    margin-inline: auto;
}

#tab-streamdeck > .panel > .panel-title-row,
#tab-streamdeck > .panel > .streamdeck-hint,
#tab-streamdeck > .panel > .streamdeck-grid,
#tab-streamdeck > .panel > #streamdeck-copy-status {
    width: min(100%, 1040px);
    margin-inline: auto;
}

#tab-admin > .panel > .panel-title-row,
#tab-admin > .panel > #admin-status,
#tab-admin > .panel > .admin-stats-grid {
    width: min(100%, 1040px);
    margin-inline: auto;
}

.streamdeck-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.streamdeck-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
    display: grid;
    gap: 8px;
}

.streamdeck-card h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #e8edf3;
}

.streamdeck-controls {
    display: grid;
    gap: 6px;
}

.streamdeck-controls input,
.streamdeck-controls select {
    width: 100%;
    max-width: 100%;
}

#streamdeck-base-url,
#streamdeck-api-key {
    height: 40px;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 10px 12px;
    background: #0f1d2a;
    color: #e6edf3;
}

#streamdeck-base-url::placeholder,
#streamdeck-api-key::placeholder {
    color: #9fb3c8;
}

#streamdeck-base-url:focus,
#streamdeck-api-key:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.streamdeck-code {
    width: 100%;
    min-height: 78px;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 10px 12px;
    background: #0f1d2a;
    color: #dbe7f3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
    resize: vertical;
}

.streamdeck-copy-btn {
    justify-self: start;
    min-height: 36px;
    padding: 0.45rem 0.85rem;
}

.streamdeck-control-list {
    display: grid;
    gap: 10px;
}

.admin-stats-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.admin-stat-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
}

.admin-stat-card h4 {
    margin: 0 0 8px;
    color: #9fb3c8;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-stat-card p {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f3f4f6;
}

.history-top3-wrap {
    width: 100%;
    display: grid;
    gap: 10px;
    justify-items: center;
}

#history-stats-grid {
    display: flex;
    justify-content: center;
}

.history-top3-title {
    margin: 0;
    color: #dbe7f3;
    font-size: 1rem;
    text-align: center;
}

.history-top3-grid {
    width: min(100%, 880px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
}

.history-podium-card {
    border: 1px solid #2d4560;
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    text-align: center;
    display: grid;
    gap: 6px;
}

.history-podium-medal {
    font-size: 1.35rem;
    line-height: 1;
}

.history-podium-name {
    color: #f3f4f6;
    font-size: 0.95rem;
}

.history-podium-count {
    color: #9fb3c8;
}

.history-podium-card.rank-1 {
    border-color: #eab308;
    min-height: 132px;
    transform: translateY(-6px);
}

.history-podium-card.rank-2 {
    border-color: #94a3b8;
    min-height: 116px;
}

.history-podium-card.rank-3 {
    border-color: #d97706;
    min-height: 104px;
}

.admin-detail-grid {
    width: min(100%, 1040px);
    margin: 14px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-detail-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
}

.admin-detail-card h3 {
    margin: 0 0 10px;
    font-size: 0.98rem;
    color: #e8edf3;
}

.admin-detail-wide {
    grid-column: 1 / -1;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-collapse {
    width: 100%;
}

.admin-collapse > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #e8edf3;
}

.admin-collapse > summary::-webkit-details-marker {
    display: none;
}

.admin-collapse > summary span {
    min-width: 34px;
    text-align: center;
    border-radius: 999px;
    border: 1px solid #335677;
    background: rgba(14, 31, 48, 0.85);
    color: #dbe7f3;
    padding: 2px 8px;
    font-size: 0.82rem;
}

.admin-collapse-content {
    margin-top: 10px;
}

.admin-list-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(11, 24, 38, 0.72);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.admin-list-row span {
    color: #dbe7f3;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.admin-list-row strong {
    color: #9fb3c8;
    font-size: 0.82rem;
    white-space: nowrap;
}

.admin-list-row button {
    flex-shrink: 0;
}

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 11, 18, 0.62);
    backdrop-filter: blur(2px);
    z-index: 3000;
}

.app-dialog-backdrop.is-open {
    display: flex;
}

.app-dialog {
    width: min(100%, 460px);
    border-radius: 14px;
    border: 1px solid #2f4f6d;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    padding: 16px;
    color: #e8edf3;
}

.app-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.02rem;
}

.app-dialog p {
    margin: 0;
    color: #dbe7f3;
    line-height: 1.45;
    white-space: pre-line;
}

.app-dialog-input {
    width: 100%;
    margin-top: 12px;
}

.app-dialog-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.admin-user-actions button {
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    font-size: 0.83rem;
    border-radius: 8px;
    white-space: nowrap;
}

.social-grid {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 12px;
}

.social-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-card h3,
.social-card h4 {
    margin: 0;
}

.social-card h4 {
    margin-top: 6px;
    color: #9fb3c8;
    font-size: 0.9rem;
}

.social-block {
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: rgba(11, 24, 38, 0.55);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.social-search-form {
    margin: 0;
}

.social-requests-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.social-mini-stat {
    border: 1px solid rgba(124, 58, 237, 0.24);
    background: rgba(16, 33, 52, 0.78);
    border-radius: 10px;
    padding: 8px 10px;
    display: grid;
    gap: 2px;
}

.social-mini-stat small {
    color: #9fb3c8;
    font-size: 0.78rem;
}

.social-mini-stat strong {
    color: #e9eff6;
    font-size: 1rem;
}

.social-user-list {
    display: grid;
    gap: 8px;
}

.social-user-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border-radius: 11px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    background: rgba(16, 33, 52, 0.78);
}

.social-card-friends {
    min-height: 560px;
}

.social-card-friends #friend-list {
    gap: 10px;
}

.social-card-friends .social-user-card {
    padding: 10px 12px;
}

.social-card-friends .social-avatar {
    width: 38px;
    height: 38px;
}

.social-card-friends .chat-conversation-top {
    font-size: 0.95rem;
}

.social-card .admin-collapse {
    margin-top: 2px;
}

.social-request-row {
    padding: 6px 8px;
    border-radius: 9px;
    gap: 8px;
}

.social-request-row span {
    font-size: 0.86rem;
}

.social-request-btn {
    min-height: 30px;
    padding: 0.32rem 0.62rem;
    font-size: 0.78rem;
    border-radius: 7px;
}

.social-remove-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(220, 38, 38, 0.6);
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.social-remove-icon-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.9);
    transform: none;
}

#chat-send-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 10px;
}

#chat-send-button i {
    font-size: 0.9rem;
}

.social-group-form {
    width: 100%;
    margin: 0;
}

#friend-search-input,
#chat-message-input,
#chat-group-title {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 10px 12px;
    background: #0f1d2a;
    color: #e6edf3;
}

#friend-search-input:focus,
#chat-message-input:focus,
#chat-group-title:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

#chat-group-members {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 8px;
    background: #0f1d2a;
    color: #e6edf3;
}

.chat-conversation-item {
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.chat-conversation-item:hover {
    border-color: #53769c;
    background: rgba(16, 33, 52, 0.9);
}

.chat-conversation-item.active {
    border-color: #8b5cf6;
    background: rgba(76, 29, 149, 0.22);
}

.chat-conversation-item .chat-conversation-preview {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #9fb3c8;
}

.social-user-cell {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.social-chat-target {
    cursor: pointer;
}

.social-chat-target:hover .chat-conversation-top {
    color: #ffffff;
}

.social-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    background: linear-gradient(135deg, #243f5a, #1b3047);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #dbe7f3;
    flex-shrink: 0;
}

.social-avatar-img {
    object-fit: cover;
    background: #1b3047;
}

.chat-conversation-main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.chat-conversation-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
    color: #e8edf3;
}

.chat-conversation-top small {
    margin-left: auto;
    color: #9fb3c8;
    font-weight: 500;
    font-size: 0.76rem;
    white-space: nowrap;
}

.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(124, 58, 237, 0.5);
    background: rgba(124, 58, 237, 0.22);
    color: #d8b4fe;
    font-size: 0.68rem;
    padding: 1px 7px;
    white-space: nowrap;
}

.friend-launch-btn {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    box-shadow: none;
    border: 1px solid rgba(124, 58, 237, 0.25);
    background: linear-gradient(135deg, #22384f, #1a2d42);
}

.friend-launch-btn:hover {
    background: linear-gradient(135deg, #2a4662, #20394f);
    transform: none;
}

.chat-messages {
    border: 1px solid rgba(124, 58, 237, 0.28);
    border-radius: 10px;
    background: rgba(11, 24, 38, 0.75);
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    max-width: 85%;
    border-radius: 10px;
    padding: 7px 9px;
    line-height: 1.35;
    border: 1px solid rgba(124, 58, 237, 0.2);
    background: rgba(16, 33, 52, 0.82);
    color: #e9eff6;
}

.chat-message.self {
    align-self: flex-end;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-color: rgba(124, 58, 237, 0.6);
    color: #fff;
}

.chat-message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.chat-message-head strong {
    font-size: 0.86rem;
    font-weight: 700;
}

.chat-message-head small {
    font-size: 0.72rem;
    opacity: 0.84;
    white-space: nowrap;
}

.chat-message-body {
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-avatar-block {
    width: min(100%, 560px);
    margin: 6px auto 4px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    display: grid;
    gap: 10px;
}

.profile-pseudo-block {
    width: min(100%, 560px);
    margin: 6px auto 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    display: grid;
    gap: 10px;
}

.profile-pseudo-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-height: 0;
}

.profile-pseudo-suggestion {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    background: rgba(124, 58, 237, 0.2);
    color: #eef4ff;
    font-size: 0.85rem;
}

.profile-pseudo-suggestion:hover {
    background: rgba(124, 58, 237, 0.32);
    border-color: rgba(167, 139, 250, 0.8);
}

.profile-avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(124, 58, 237, 0.45);
    justify-self: center;
}

.queue-controls {
    margin-top: 6px;
    display: flex;
    justify-content: center;
}

.transport-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.queue-volume-control {
    position: static;
    transform: none;
    width: 100%;
    max-width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 0;
    margin-top: 2px;
    margin-left: 0;
    border-left: none;
    border-top: 1px solid rgba(116, 149, 179, 0.35);
}

.queue-volume-control label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b8cde0;
    margin: 0;
    font-size: 0.8rem;
    white-space: nowrap;
}

.queue-volume-control label i {
    color: #9fb3c8;
    font-size: 0.85rem;
}

.queue-volume-control input[type="range"] {
    width: 96px;
    height: 4px;
    accent-color: #7c3aed;
}

.queue-controls button {
    min-width: 118px;
}

.queue-controls button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.transport-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #13253a, #0e1d2d);
    border: 1px solid #2b435d;
    border-radius: 999px;
    padding: 8px 14px;
    width: min(100%, 1040px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.transport-btn {
    min-width: 46px !important;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.35);
    background: linear-gradient(135deg, #23384f, #1a2d42);
    box-shadow: 0 0 0 transparent;
}

.transport-btn i {
    font-size: 0.95rem;
}

.transport-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a4662, #20394f);
}

.transport-btn-primary {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-color: rgba(124, 58, 237, 0.8);
}

.transport-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
}

#tab-configs > .panel > h2,
#tab-configs > .panel > label[for="discord-config-select"] {
    text-align: center;
}

.queue-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-item {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
}

.queue-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.queue-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: #d8b4fe;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.35);
    white-space: nowrap;
}

#tab-sounds > .panel .panel-title-row,
#tab-sounds > .panel #sound-storage-status,
#tab-sounds > .panel #sound-empty,
#tab-sounds > .panel #sound-list,
#tab-sounds > .panel .sounds-help-text {
    width: min(100%, 1040px);
    margin-inline: auto;
}

.storage-status-card {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid #28465f;
    background: linear-gradient(180deg, #15293d, #112235);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.storage-status-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.storage-status-head strong {
    color: #e8edf3;
}

.storage-status-head span {
    color: #c4d3e2;
    font-size: 0.9rem;
}

.storage-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(11, 24, 38, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.25);
    overflow: hidden;
}

.storage-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #22c55e);
    transition: width 0.25s ease;
}

#storage-status-meta {
    display: block;
    margin-top: 8px;
    color: #9fb3c8;
}

#open-sound-upload-modal {
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    min-height: 36px;
    border-radius: 9px;
    line-height: 1;
    white-space: nowrap;
}

#open-folder-create-button,
#sound-search-arrange-button {
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    min-height: 36px;
    border-radius: 9px;
    line-height: 1;
    white-space: nowrap;
}

#tab-sounds > .panel .sounds-toolbar {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#tab-sounds > .panel .panel-title-row {
    position: static;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#tab-sounds > .panel .panel-title-row h2 {
    position: static;
    left: auto;
    transform: none;
    width: auto;
    pointer-events: auto;
    margin: 0;
    text-align: center;
}

#tab-sounds > .panel .sounds-toolbar #sound-favorites-filter {
    margin-left: 2px;
}

#tab-sounds > .panel .sounds-toolbar #sound-folder-filter {
    width: 220px;
    min-width: 190px;
    margin: 0;
}

#sound-advanced-search,
#sound-min-size-mb,
#sound-max-size-mb,
#profile-pseudo-input,
#collection-name-input,
#collection-select,
#queue-public-link-output {
    height: 38px;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 8px 10px;
    background: #0f1d2a;
    color: #e6edf3;
}

#sound-advanced-search {
    width: 210px;
}

#sound-min-size-mb,
#sound-max-size-mb {
    width: 95px;
}

.sound-search-panel {
    width: min(100%, 1040px);
    margin: 10px auto 0;
}

.sound-search-row {
    justify-content: flex-start;
}

.sound-search-row #sound-search-apply-button {
    flex: 0 0 auto;
}

#queue-public-link-output {
    width: min(100%, 1040px);
    margin: 0 auto 10px;
    display: block;
}

.sound-quick-tools {
    width: min(100%, 1040px);
    margin: 10px auto 2px;
    display: grid;
    gap: 8px;
}

.sound-collections-row {
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    background: rgba(11, 24, 38, 0.52);
}

.sound-collections-row #collection-name-input {
    width: 240px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #355270;
    background: #102134;
    color: #e9eff6;
    box-shadow: none;
}

.sound-collections-row #collection-select {
    width: 240px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #355270;
    background-color: #102134;
    color: #e9eff6;
    box-shadow: none;
}

.sound-collections-row #save-collection-button,
.sound-collections-row #play-collection-button,
.sound-collections-row #delete-collection-button {
    min-height: 40px;
    border-radius: 10px;
    padding: 0 12px;
    box-shadow: none;
}

.sound-collections-row #save-collection-button,
.sound-collections-row #play-collection-button {
    border: 1px solid rgba(124, 58, 237, 0.35);
    background: linear-gradient(135deg, #23384f, #1a2d42);
}

.sound-collections-row #save-collection-button:hover,
.sound-collections-row #play-collection-button:hover {
    background: linear-gradient(135deg, #2a4662, #20394f);
}

.collection-add-btn.active {
    border-color: rgba(34, 197, 94, 0.85);
    background: linear-gradient(135deg, #103927, #0f2d20);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}


.sound-hotkeys-row {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    background: #0f1d2a;
}

.sound-hotkeys-copy {
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
}

.sound-hotkeys-copy strong {
    font-size: 0.95rem;
    color: #e6edf3;
    font-weight: 700;
}

.sound-hotkeys-copy .hint {
    margin: 0;
    color: #9fb3c8;
    font-size: 0.82rem;
}

.sound-hotkeys-toggle-button {
    margin: 0;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: none;
    transform: none;
}

.sound-hotkeys-toggle-button:hover {
    transform: none;
    box-shadow: none;
}

.sound-hotkeys-toggle-button:active {
    transform: none;
}

.sound-hotkeys-toggle-button.is-enabled {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.upload-dropzone {
    width: 100%;
    min-height: 64px;
    border: 1px dashed #385472;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #9fb3c8;
    background: rgba(15, 29, 42, 0.65);
    text-align: center;
    padding: 10px;
}

.upload-dropzone.is-dragover {
    border-color: #8b5cf6;
    background: rgba(37, 28, 74, 0.4);
    color: #dcd2ff;
}

.upload-progress-wrap {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(11, 24, 38, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.25);
    display: none;
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #22c55e);
    transition: width 0.15s ease;
}

.sounds-help-text {
    text-align: center;
    margin-top: -2px;
    margin-bottom: 10px;
}

.inline-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.inline-form label {
    font-size: 0.9rem;
    color: #b7c9d9;
    width: 100%;
    text-align: center;
}

.inline-form input,
.inline-form select {
    flex: 1 1 260px;
    min-width: 0;
    width: min(100%, 420px);
    max-width: 100%;
}

#admin-user-search {
    flex: 1 1 260px;
    min-width: 0;
    width: min(100%, 420px);
    max-width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #2d3f52;
    padding: 10px 12px;
    background: #0f1d2a;
    color: #e6edf3;
}

#admin-user-search::placeholder {
    color: #9fb3c8;
}

#admin-user-search:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

#admin-user-search-button {
    min-height: 40px;
}

.folder-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.folder-manager-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.folder-manager-block h3 {
    margin: 0 0 8px;
    text-align: left;
    font-size: 1rem;
    color: #e8edf3;
}

.folder-manager-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.folder-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: rgba(11, 24, 38, 0.75);
}

.folder-manager-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.folder-edit-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #385472;
    background-color: #102134;
    color: #e9eff6;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 10px;
}

.folder-edit-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.folder-manager-info strong {
    color: #e9eff6;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.folder-manager-info span {
    color: #9fb3c8;
    font-size: 0.8rem;
}

.folder-manager-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.folder-action-btn {
    min-height: 34px;
    padding: 0.4rem 0.75rem;
    font-size: 0.84rem;
    border-radius: 8px;
}

.folder-delete-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(220, 38, 38, 0.6);
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.folder-delete-icon-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.9);
    transform: none;
}

.panel {
    backdrop-filter: blur(4px);
}

.panel h2 {
    letter-spacing: 0.3px;
}

.stack-form button,
.config-actions button,
.inline-form button {
    border: 1px solid rgba(124, 58, 237, 0.35);
    max-width: 100%;
}

.sound-share-modal .modal-content {
    width: min(680px, 92vw);
}

.config-share-modal .modal-content {
    width: min(680px, 92vw);
}

.folder-delete-modal .folder-delete-content {
    width: min(640px, 92vw);
    text-align: left;
}

#folder-delete-title {
    margin-bottom: 2px;
    color: #dbe7f3;
}

#folder-delete-sound-count {
    margin-top: 0;
}

#folder-delete-target {
    width: 100%;
    height: 40px;
    border-radius: 9px;
    border: 1px solid #385472;
    background-color: #102134;
    color: #e9eff6;
    font-weight: 600;
    padding: 0 38px 0 12px;
    margin-bottom: 4px;
}

.config-help-modal .config-help-content {
    width: min(760px, 92vw);
    text-align: left;
}

.config-help-steps {
    margin: 6px 0 12px 18px;
    padding: 0;
    display: grid;
    gap: 8px;
    color: #dbe7f3;
    line-height: 1.5;
}

.config-help-steps li {
    padding-left: 2px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    color: #dbe7f3;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
}

.share-user-results {
    margin-top: 4px;
    max-height: 240px;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.25);
    background: rgba(11, 24, 38, 0.75);
    padding: 8px;
    display: grid;
    gap: 8px;
}

.share-user-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: center;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: rgba(16, 33, 52, 0.8);
}

.share-user-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #7c3aed;
}

.share-user-item span {
    color: #e9eff6;
    font-weight: 600;
    line-height: 1.2;
}


@media (max-width: 900px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }

    .header-actions {
        margin-right: 12px;
    }

    .panel-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-item {
        flex-direction: column;
        align-items: stretch;
    }

    .config-item .danger-outline {
        width: 100%;
    }

    .config-item-actions {
        width: 100%;
    }

    .config-item-actions button {
        width: 100%;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .social-user-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .social-user-card > .hint,
    .social-user-card > button,
    .social-user-card .admin-user-actions {
        justify-self: start;
    }
}

.dashboard-tabs {
    width: min(1100px, 94vw);
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.tab-btn {
    background: #1b2a3a;
    border: 1px solid #2d4a66;
    box-shadow: none;
}

.tab-btn.active {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-color: #7c3aed;
}

.tab-panel {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tab-panel.active {
    display: grid;
}

.tab-panel .panel-wide {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .dashboard-tabs {
        flex-wrap: wrap;
    }

    .tab-panel.active {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 14px;
    }

    .inline-form input,
    .inline-form select,
    .inline-form button {
        width: 100%;
        flex: 1 1 100%;
    }

    .sound-hotkeys-row {
        align-items: flex-start;
    }

    .sound-hotkeys-toggle-button {
        width: 100%;
    }
}

/* Landing page refresh (scoped) */
.landing-page {
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
        radial-gradient(900px 420px at 100% 10%, rgba(35, 100, 168, 0.25), transparent 55%),
        #0d0d1a;
    display: block;
    min-height: 100vh;
}

.landing-page .landing-header {
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(43, 71, 116, 0.95));
}

.landing-page .landing-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
}

.landing-page .landing-header-actions {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-page .header-login-btn {
    padding: 8px 14px;
    font-size: 0.92rem;
    border-radius: 999px;
    background: rgba(11, 24, 38, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.landing-page .header-login-btn:hover {
    transform: translateY(-1px);
}

.landing-main {
    width: min(1120px, 94vw);
    margin: 28px auto 40px;
    display: grid;
    gap: 18px;
}

.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: center;
    background: linear-gradient(160deg, rgba(18, 32, 49, 0.95), rgba(16, 30, 44, 0.88));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.landing-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4b5fd;
    font-weight: 700;
    font-size: 0.74rem;
}

.landing-hero h2 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.12;
    color: #ffffff;
}

.landing-hero-copy > p {
    margin: 0;
    color: #c8d8e6;
    line-height: 1.6;
}

.landing-cta-row {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.landing-cta-row .secondary-cta {
    background: linear-gradient(135deg, #1f3750, #182c41);
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: none;
}

.landing-hero-media {
    display: flex;
    justify-content: center;
}

.landing-page .logo_botify {
    width: min(100%, 320px);
    margin: 0;
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.28);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.landing-feature-card {
    background: linear-gradient(180deg, #162b40, #0f1f2e);
    border: 1px solid #28465f;
    border-radius: 14px;
    padding: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.24);
}

.landing-feature-card h3 {
    margin: 0 0 8px;
    color: #f3f4f6;
    font-size: 1rem;
}

.landing-feature-card p {
    margin: 0;
    color: #9fb3c8;
    line-height: 1.5;
}

.landing-page footer {
    width: min(1120px, 94vw);
    margin: 0 auto 20px;
    opacity: 0.88;
}

@media (max-width: 1200px) {
    .landing-page .landing-header {
        padding-left: 1.2rem;
    }

    .landing-main {
        width: min(96vw, 1040px);
    }
}

@media (max-width: 900px) {
    .landing-page .landing-header {
        position: static;
        padding: 0.85rem 0.9rem;
        gap: 10px;
    }

    .landing-page .landing-brand h1 {
        font-size: 1.35rem;
        margin: 0;
    }

    .landing-page .botify-header {
        width: 42px;
    }

    .landing-page .landing-header-actions {
        margin-right: 0;
        gap: 8px;
    }

    .landing-page .header-login-btn {
        padding: 7px 11px;
        font-size: 0.85rem;
    }

    .landing-main {
        margin: 16px auto 26px;
        gap: 12px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 14px;
    }

    .landing-hero h2 {
        font-size: clamp(1.45rem, 5.2vw, 2rem);
    }

    .landing-features {
        grid-template-columns: 1fr;
    }

    .landing-feature-card {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .landing-page .landing-header {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .landing-page .landing-brand {
        min-width: 0;
    }

    .landing-page .landing-brand h1 {
        font-size: 1.2rem;
    }

    .landing-page .install-app-link {
        margin: 0;
    }

    .landing-page .landing-header-actions {
        margin-left: auto;
    }

    .landing-hero {
        border-radius: 14px;
        padding: 14px;
    }

    .landing-kicker {
        font-size: 0.68rem;
    }

    .landing-hero-copy > p {
        font-size: 0.94rem;
    }

    .landing-cta-row {
        flex-direction: column;
    }

    .landing-cta-row button {
        width: 100%;
    }

    .landing-page .logo_botify {
        max-width: 240px;
    }

    .landing-page footer {
        width: min(96vw, 1120px);
        font-size: 0.88rem;
        text-align: center;
    }
}

/* Mobile dashboard hardening */
@media (max-width: 900px) {
    header {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .lang-switcher {
        justify-content: center;
    }

    .profile-pill {
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    #logout-button {
        width: 100%;
        min-height: 42px;
    }

    .dashboard-tabs {
        width: 100%;
        margin: 0 0 12px;
        padding: 0 0.9rem 4px;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-height: 40px;
        white-space: nowrap;
        padding-inline: 0.85rem;
    }

    .dashboard-main {
        width: 100%;
        padding: 0 0.9rem;
        margin-bottom: 14px;
    }

    .tab-panel .panel .panel-title-row {
        position: static;
        justify-content: flex-start;
        align-items: stretch;
        min-height: 0;
        gap: 10px;
    }

    .tab-panel .panel .panel-title-row h2 {
        position: static;
        left: auto;
        transform: none;
        pointer-events: auto;
        margin: 0;
        text-align: left;
        font-size: 1.2rem;
    }

    .tab-panel .panel .panel-title-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .tab-panel .panel .panel-title-actions button {
        width: 100%;
        min-height: 42px;
    }

    .queue-controls button {
        min-width: 0;
    }

    .config-item .danger-outline {
        white-space: normal;
    }

    .streamdeck-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .modal-content,
    .register-modal,
    .upload-modal,
    .config-help-modal .config-help-content,
    .folder-delete-modal .folder-delete-content,
    .sound-share-modal .modal-content,
    .config-share-modal .modal-content {
        width: min(94vw, 640px);
        max-height: 88vh;
        overflow-y: auto;
    }

    .sound-grid {
        grid-template-columns: 1fr;
    }

    .sound-actions {
        flex-direction: column;
    }

    .sound-actions button {
        width: 100%;
        min-height: 42px;
    }

    .sound-card-minimal {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sound-card-minimal .sound-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .sound-card-minimal .sound-actions button {
        width: 40px;
        min-height: 40px;
    }

    .sound-delete-icon {
        width: 32px;
        height: 32px;
    }

    .transport-bar {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
    }

    .transport-buttons {
        width: 100%;
        justify-content: center;
    }

    .queue-volume-control {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        justify-content: center;
        border-left: none;
        border-top: 1px solid rgba(116, 149, 179, 0.35);
        margin-top: 4px;
        padding: 8px 0 0;
    }

    .admin-list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-user-actions {
        width: 100%;
        justify-content: stretch;
    }

    .admin-user-actions button {
        width: 100%;
    }

    .chat-messages {
        min-height: 220px;
        max-height: 340px;
    }

.chat-message {
        max-width: 100%;
    }
}
