@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    color: #e5e7eb;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.animated-bg {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #3b0764, #1a1a2e);
    background-size: 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-right {
    animation: slide-in-right 0.3s ease-out;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .container {
        max-width: 1200px;
        padding: 2rem;
    }
}

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

@media (min-width: 640px) {
    .header {
        margin-bottom: 2rem;
    }
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
}

@media (min-width: 640px) {
    .content-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.filters {
    width: 100%;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .filters {
        width: 300px;
        margin-bottom: 0;
    }
}

.main-content {
    flex: 1;
    max-width: 100%;
    margin: 0;
}

@media (min-width: 640px) {
    .main-content {
        max-width: 600px;
        margin: 0 3rem;
    }
}

.sidebar {
    width: 100%;
    z-index: 800;
}

@media (min-width: 640px) {
    .sidebar {
        width: 300px;
    }
}

.leaderboard-sidebar {
    width: 100%;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .leaderboard-sidebar {
        width: 300px;
        margin-bottom: 0;
    }
}

.block-background {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: transform 0.3s, box-shadow 0.3s;
}

.block-background:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

.welcome-text {
    background: linear-gradient(90deg, rgba(124,58,237,0.8), rgba(59,130,246,0.8));
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.welcome-text:hover {
    transform: scale(1.02);
}

.custom-player {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, rgba(124,58,237,0.8), rgba(236,72,153,0.8));
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.custom-player:hover {
    transform: scale(1.02);
}

.play-btn {
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

@media (min-width: 640px) {
    .play-btn {
        font-size: 2rem;
    }
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.equalizer {
    display: flex !important;
    gap: 4px;
    margin-left: 1rem;
}

.bar {
    width: 6px;
    background: #ffffff;
    border-radius: 3px;
    animation: equalize 1s infinite ease-in-out;
    opacity: 0.8;
}

@media (min-width: 640px) {
    .bar {
        height: 20px;
    }
}

.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes equalize {
    0% { height: 16px; transform: scaleY(0.5); }
    50% { height: 32px; transform: scaleY(1); }
    100% { height: 16px; transform: scaleY(0.5); }
}

@media (min-width: 640px) {
    @keyframes equalize {
        0% { height: 20px; transform: scaleY(0.5); }
        50% { height: 40px; transform: scaleY(1); }
        100% { height: 20px; transform: scaleY(0.5); }
    }
}

.equalizer.paused .bar {
    animation-play-state: paused;
}

.option-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.option-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 639px) {
    .option-card:hover {
        transform: none;
    }
}

.option-card.selected {
    background: linear-gradient(90deg, rgba(124,58,237,0.8), rgba(236,72,153,0.8));
    box-shadow: 0 0 10px rgba(124,58,237,0.5);
}

.option-text {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.option-title,
.option-artist {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.option-artist {
    margin-top: 0.25rem;
}

.option-title.truncated:hover::after,
.option-artist.truncated:hover::after {
    content: attr(data-full-text);
    position: absolute;
    left: 0;
    top: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #e5e7eb;
    padding: 0.5rem;
    border-radius: 4px;
    z-index: 10;
    white-space: normal;
    max-width: 200px;
    font-size: 0.875rem;
}

.difficulty-button {
    min-width: 120px;
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 640px) {
    .difficulty-button {
        min-width: 160px;
    }
}

.difficulty-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.difficulty-text {
    font-weight: bold;
}

.points-text {
    display: block;
    font-weight: normal;
    margin-top: 0.25rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1e1e2f;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    color: #e5e7eb;
    max-width: 100%;
    width: 90%;
    animation: fadeIn 0.3s ease-out;
}

@media (min-width: 640px) {
    .modal-content {
        padding: 2rem;
        max-width: 500px;
    }
}

.modal-content h2 {
    color: #f87171;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

@media (min-width: 640px) {
    .modal-content h2 {
        font-size: 1.5rem;
    }
}

.modal-content h2.correct {
    color: #28a745;
}

.modal-content p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .modal-content p {
        font-size: 1rem;
    }
}

.modal-content a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 640px) {
    .modal-content a {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

.modal-content a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e2f;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    z-index: 900;
}

@media (min-width: 640px) {
    .chat-fullscreen {
        padding: 2rem;
    }
}

.chat-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.5rem;
    background: #374151;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.chat-input:focus {
    background: #4b5563;
}

@media (min-width: 640px) {
    .chat-input {
        font-size: 1rem;
    }
}

.chat-send-btn {
    background: none;
    color: #3b82f6;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 640px) {
    .chat-send-btn {
        font-size: 1.2rem;
    }
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.leaderboard-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e2f;
    padding: 1rem;
    text-align: center;
    z-index: 900;
}

@media (min-width: 640px) {
    .leaderboard-fullscreen {
        padding: 2rem;
    }
}.filter-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: linear-gradient(90deg, #2d3748, #4a5568);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-select:hover,
.filter-select:focus {
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
    outline: none;
}

.filter-select::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e2e8f0' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); /* Светло-серый цвет стрелки */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.5em;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

.filter-select:hover::after,
.filter-select:focus::after {
    stroke: #ffffff;
    transform: translateY(-50%) rotate(180deg);
}

@media (min-width: 640px) {
    .filter-select {
        font-size: 1rem;
        padding: 0.75rem 2.5rem 0.75rem 1rem;
    }
    .filter-select::after {
        background-size: 1.8em;
    }
}

.filter-select option {
    background: #1e1e2f;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.custom-select {
    position: relative;
    display: inline-block;
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e1e2f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
}

.select-options div {
    padding: 0.5rem 1rem;
    color: #e2e8f0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.select-options div:hover {
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    color: #ffffff;
}
.apply-btn {
    width: 100%;
    padding: 0.5rem;
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .apply-btn {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

.apply-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-group {
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .filter-group {
        margin-bottom: 1.5rem;
    }
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@media (min-width: 640px) {
    .loader {
        width: 24px;
        height: 24px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

button, a, .option-card, .chat-send-btn, .play-btn {
    touch-action: manipulation;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2d3748;
}
::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

footer {
    width: 100vw;
    background: #1e1e2f;
    padding: 1rem 0;
    text-align: center;
    z-index: 10;
}

.cookie-consent {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: linear-gradient(45deg, #1e1e2f, #374151);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    color: #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 100px;
}

@media (min-width: 640px) {
    .cookie-consent {
        max-width: 400px;
        left: auto;
        right: 1rem;
        font-size: 1rem;
        padding: 2rem;
    }
}

.cookie-consent p {
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.5rem;
}

.cookie-consent button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.cookie-consent .accept-btn {
    background: linear-gradient(45deg, #3b82f6, #ec4899);
    color: white;
}

.cookie-consent .accept-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cookie-consent .decline-btn {
    background: #4b5563;
    color: white;
}

.cookie-consent .decline-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
}

.nav-btn:hover {
    background: linear-gradient(45deg, #a855f7, #ec4899, #f43f5e);
    transform: scale(1.05);
}/* Существующие стили остаются без изменений, добавляем только toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b5563;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(45deg, #3b82f6, #ec4899);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}/* Стили для Segmented Controls */
.segmented-control {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #1f2937;
    border: 1px solid #4b5563;
    width: 100%;
}

.segmented-radio {
    display: none;
}

.segmented-button {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease-in-out;
}

.segmented-button:hover {
    opacity: 0.8;
}

.segmented-radio:checked + .segmented-button {
    background: linear-gradient(to right, #2563eb, #a855f7, #ec4899) !important;
    opacity: 1 !important;
}

.segmented-button:not(.segmented-radio:checked + .segmented-button) {
    opacity: 0.5;
}
.segmented-button.easy-button {
    background: linear-gradient(to right, #16a34a, #22c55e); /* зелёный */
}

.segmented-button.medium-button {
    background: linear-gradient(to right, #ca8a04, #eab308); /* жёлтый */
}

.segmented-button.hard-button {
    background: linear-gradient(to right, #dc2626, #ef4444); /* красный */
}

.segmented-radio:checked + .segmented-button.easy-button,
.segmented-radio:checked + .segmented-button.medium-button,
.segmented-radio:checked + .segmented-button.hard-button {
    opacity: 1 !important;
}
/* Стили для списка игроков и результатов */
.player-list {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #1f2937;
    border-radius: 0.5rem;
}

.player-list-item {
    padding: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

.result-message {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #374151;
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
}
