/* Menu Główne */
.menu-container {
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #558B2F;
    text-align: center;
    min-width: 500px;
    box-shadow: 0 0 50px rgba(85, 139, 47, 0.5);
    z-index: 1001;
}

.menu-container h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    color: #90CAF9;
    text-shadow: 0 0 10px rgba(144, 202, 249, 0.5);
}

.menu-container h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #FFEB3B;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #1565C0, #42A5F5);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(66, 165, 245, 0.4);
    background: linear-gradient(45deg, #42A5F5, #1565C0);
}

.menu-btn:active {
    transform: translateY(0);
}

.difficulty-btn.easy { background: linear-gradient(45deg, #4CAF50, #81C784); }
.difficulty-btn.normal { background: linear-gradient(45deg, #2196F3, #64B5F6); }
.difficulty-btn.hard { background: linear-gradient(45deg, #F44336, #E57373); }

.difficulty-btn.easy:hover { background: linear-gradient(45deg, #81C784, #4CAF50); }
.difficulty-btn.normal:hover { background: linear-gradient(45deg, #64B5F6, #2196F3); }
.difficulty-btn.hard:hover { background: linear-gradient(45deg, #E57373, #F44336); }

/* Credits */
.credits-content {
    margin: 20px 0;
    line-height: 1.6;
    color: #BDBDBD;
}

.credits-content strong {
    color: #FFEB3B;
    font-size: 1.3rem;
}

/* === NOWE STYLE DLA KREATORA TALII === */
#deck-builder-screen .deck-builder-container {
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 20px;
    border: 3px solid #1565C0; /* Niebieska ramka */
    text-align: center;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 0 50px rgba(66, 165, 245, 0.5);
    z-index: 1001;
    max-height: 90vh; /* Ustawienie maksymalnej wysokości */
    overflow-y: auto; /* Włączenie przewijania pionowego */
}

.deck-current-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.deck-current-container h3 {
    margin: 0 0 15px 0;
    color: #FFEB3B;
}

.deck-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px; /* Miejsce na karty */
    gap: 10px;
    flex-wrap: wrap; /* W razie czego */
}

.deck-collection-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.deck-collection-container h3 {
    margin: 0 0 15px 0;
    color: #90CAF9;
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsywna siatka */
    gap: 10px;
    justify-items: center;
}

/* Lekkie zmniejszenie kart w siatce wyboru */
.deck-grid .card {
    margin: 0;
    transform: scale(0.95);
}
.deck-grid .card:hover {
    transform: scale(1.0) translateY(-3px);
}

/* Styl dla karty, która jest już w talii */
.card.card-in-deck {
    opacity: 0.3;
    filter: grayscale(100%);
    border-color: #F44336;
    cursor: not-allowed;
}
.card.card-in-deck:hover {
    transform: scale(0.95); /* Wyłącz efekt hover */
}

/* Style dla zakładek */
.deck-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.deck-tab-btn {
    padding: 10px 20px;
    font-size: 1rem;
    background: linear-gradient(45deg, #616161, #9E9E9E); /* Szary, nieaktywny */
}

.deck-tab-btn.active {
    background: linear-gradient(45deg, #1565C0, #42A5F5); /* Niebieski, aktywny */
    box-shadow: 0 5px 15px rgba(66, 165, 245, 0.4);
    transform: translateY(-3px);
}

/* Style dla filtrów i sortowania */
.deck-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-btn, .sort-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: linear-gradient(45deg, #616161, #9E9E9E); /* Szary, nieaktywny */
}

.filter-btn.active, .sort-btn.active {
    background: linear-gradient(45deg, #1565C0, #42A5F5); /* Niebieski, aktywny */
    box-shadow: 0 3px 10px rgba(66, 165, 245, 0.4);
    transform: translateY(-2px);
}

/* Niestandardowy pasek przewijania */
#deck-builder-screen .deck-builder-container::-webkit-scrollbar {
    width: 12px;
}

#deck-builder-screen .deck-builder-container::-webkit-scrollbar-track {
    background: #212121; /* Ciemne tło */
    border-radius: 10px;
}

#deck-builder-screen .deck-builder-container::-webkit-scrollbar-thumb {
    background-color: #42A5F5; /* Niebieski kolor */
    border-radius: 10px;
    border: 3px solid #212121; /* Dopasowanie do tła */
}

#deck-builder-screen .deck-builder-container::-webkit-scrollbar-thumb:hover {
    background-color: #64B5F6; /* Jaśniejszy niebieski przy najechaniu */
}
/* === KONIEC NOWYCH STYLI === */

/* === USTAWIENIA === */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #E0E0E0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: 8px;
}

.setting-item label {
    font-size: 1.1rem;
    font-weight: bold;
}

.setting-item span {
    color: #FFEB3B;
}

/* Stylizacja suwaka */
.setting-item input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 250px;
    height: 8px;
    background: #424242;
    outline: none;
    border-radius: 5px;
    transition: opacity .2s;
}
.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #42A5F5;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid #1565C0;
}
.setting-item input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #42A5F5;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid #1565C0;
}

/* Stylizacja pola koloru */
.setting-item input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 2px solid #616161;
    cursor: pointer;
    padding: 0;
}
.setting-item input[type="color"]::-webkit-color-swatch {
    border-radius: 5px;
    border: none;
}
.setting-item input[type="color"]::-moz-color-swatch {
    border-radius: 5px;
    border: none;
}

/* Stylizacja checkboxa */
.setting-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #42A5F5;
}

/* Stylizacja przełącznika (toggle switch) */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #424242;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #42A5F5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #42A5F5;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

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

.slider.round:before {
    border-radius: 50%;
}

/* Ekran końcowy */
#end-screen .menu-container {
    background: rgba(0, 0, 0, 0.95);
    border-color: #FF9800;
}

#end-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#end-screen .result-message {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #FFEB3B;
}

#end-screen .stats {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#end-screen .stat-item {
    margin: 8px 0;
    font-size: 1.1rem;
}
#nickname-input {
    width: 250px;
    font-size: 1rem;
    padding: 5px;
    background-color: #333;
    border: 1px solid #555;
    color: #eee;
    border-radius: 5px;
}

#nickname-status {
    margin-top: 10px;
    color: #FFEB3B;
    text-align: center;
    height: 20px;
    font-weight: bold;
}
