/* --- CZCIONKI --- */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;700;900&display=swap');

:root {
    --lm-red: #9b000f;
    --lm-bg: #0a0a0a;
    --lm-card-bg: #151515;
    --lm-border: #282828;
}

body {
    background: url('background.webp') fixed center/cover;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- GŁÓWNY KONTENER --- */
.main-wrapper {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* --- SIATKA POJAZDÓW (5 KOLUMN) --- */
.car-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 20px;
}

/* --- NAGŁÓWEK (NOWY STYL) --- */
header {
    background-color: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--lm-red);
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.main-content-offset {
    height: 100px;
}

.main-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-left,
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
    gap: 15px;
}

.header-center {
    flex: 1.5;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.header-center:hover {
    transform: scale(1.02);
}

.header-right {
    justify-content: flex-end;
}

header h1 {
    font-family: 'Archivo Black', sans-serif;
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: -1px;
    transform: skew(-8deg);
}

/* --- SIATKA POJAZDÓW (3 KOLUMNY) --- */
.car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
}

.lm-card {
    background-color: var(--lm-card-bg);
    border: 1px solid var(--lm-border);
    cursor: pointer;
    transition: transform 0.1s;
}

.lm-card:hover {
    outline: 3px solid #fff;
    z-index: 2;
}

.lm-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.lm-card .info {
    padding: 10px;
    background-color: #000;
    border-top: 3px solid var(--lm-red);
}

.lm-card h2 {
    margin: 0;
    font-size: 0.85rem;
    color: #bbb;
}

.lm-card .price {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 3px;
}

/* --- WIDOK SZCZEGÓŁÓW --- */
.car-detail-container {
    padding: 20px;
}

.back-btn {
    display: none;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.detail-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.detail-header .price {
    font-size: 1.5rem;
    color: #fff;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.detail-main-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border: 1px solid var(--lm-border);
    background-color: #000;
}

.gallery-thumbs-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gallery-thumbs {
    display: flex;
    gap: 5px;
}

.thumb-container {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.thumb-container:hover {
    opacity: 0.8;
}

.thumb-container.active {
    border-color: #fff;
    opacity: 1;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumbs-wrapper::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs-wrapper::-webkit-scrollbar-track {
    background: #111;
}

.gallery-thumbs-wrapper::-webkit-scrollbar-thumb {
    background: #444;
}

.gallery-thumbs-wrapper::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.description-box {
    margin-top: 20px;
    border-top: 2px solid var(--lm-red);
    padding-top: 20px;
}

.description-box p {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsywność dla telefonów (opcjonalnie) */
@media (max-width: 800px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.discord-btn {
    background-color: #5865F2;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-transform: none;
}

.discord-btn:hover {
    background-color: #4752C4;
    transform: scale(1.05);
}

.discord-btn svg {
    width: 20px;
    height: 20px;
}

/* Discord btn on photo */
.seller-discord {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 6px;
    font-size: 0.70rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    z-index: 5;
    border-radius: 6px;
    
    display: flex;
    align-items: center;
    justify-content: flex-start;
    
    width: auto;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    box-sizing: border-box;
    transition: max-width 0.6s ease-in-out, padding 0.6s ease-in-out;
    overflow: hidden;
    white-space: nowrap;
}

.seller-discord:hover {
    max-width: 250px;
    padding: 6px 14px;
}

.discord-nickname {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    margin-left: 0;
    font-weight: 700;
    text-transform: none;
}

.seller-discord:hover .discord-nickname {
    max-width: 200px;
    opacity: 1;
    margin-left: 8px;
}

.seller-discord svg {
    flex-shrink: 0;
}

/* --- KONTROLKI: WYSZUKIWANIE I SORTOWANIE --- */
.controls-container {
    display: flex;
    gap: 15px;
    padding: 20px 20px 0;
}

.controls-container input,
.controls-container select {
    padding: 10px 15px;
    background-color: #111;
    border: 1px solid var(--lm-border);
    color: #fff;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.search-wrapper {
    flex: 1;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    box-sizing: border-box;
}

.controls-container select {
    background: #111;
    border: 1px solid #333;
    padding: 10px 15px;
    color: #fff;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.controls-container input:focus,
.controls-container select:focus {
    border-color: var(--lm-red);
}

/* --- DROPDOWN AUTOCOMPLETE --- */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #111;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 500;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
    max-height: 320px;
    overflow-y: auto;
}

.search-dropdown::-webkit-scrollbar {
    width: 4px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #111;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #333;
}

.dropdown-section-label {
    padding: 6px 14px 4px;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: #555;
    text-transform: uppercase;
    font-weight: 700;
    border-top: 1px solid #1e1e1e;
}

.dropdown-section-label:first-child {
    border-top: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s ease;
    border-left: 2px solid transparent;
}

.dropdown-item:hover {
    background: #1a1a1a;
    border-left-color: var(--lm-red);
}

.dropdown-item-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.6;
}

.dropdown-item-main {
    flex: 1;
    color: #ddd;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item-main em {
    font-style: normal;
    color: var(--lm-red);
}

.dropdown-item-sub {
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.dropdown-empty {
    padding: 14px;
    text-align: center;
    color: #555;
    font-size: 0.82rem;
}

@media (max-width: 600px) {
    .controls-container {
        flex-direction: column;
    }
}

.auth-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.nav-btn:hover {
    background-color: var(--lm-red);
    color: #fff;
    transform: scale(1.05);
}

#user-display {
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
    background: transparent !important;
    color: #fff !important;
}

#logged-out-view a {
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

#user-display:hover,
#logged-out-view a:hover {
    color: #fff !important;
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
}

.btn-red {
    background-color: var(--lm-red);
    color: #fff;
}

.header-nav-btn {
    color: #fff !important;
    border-color: #333 !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-nav-btn:hover {
    background-color: transparent !important;
    color: #fff !important;
    border-color: var(--lm-red) !important;
}

.btn-sort-dir:hover {
    background-color: transparent !important;
    border-color: var(--lm-red) !important;
    color: var(--lm-red) !important;
    transform: scale(1.05);
}

/* Modal dla logowania */
.auth-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 2px solid var(--lm-red);
    padding: 30px;
    z-index: 1000;
    width: 300px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

/* Tło za modalem */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

/* Okno modala */
.auth-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0f0f0f;
    border: 2px solid var(--lm-red);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    z-index: 1001;
    box-shadow: 0 0 30px rgba(155, 0, 15, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-family: 'Archivo Black', sans-serif;
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.close-x {
    background: none;
    border: none;
    color: #555;
    font-size: 2rem;
    cursor: pointer;
}

.close-x:hover {
    color: var(--lm-red);
}

/* Inputy w modalu */
.modal-body input,
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body textarea {
    text-transform: none;
}

.modal-body input:focus,
.modal-body textarea:focus {
    border-color: var(--lm-red);
    outline: none;
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

.modal-footer a {
    color: var(--lm-red);
    text-decoration: none;
}

/* --- WYSTAW AUTO FORM --- */
.form-container {
    max-width: 700px;
    margin: 20px auto;
    background: #0f0f0f;
    padding: 25px 35px;
    border-radius: 16px;
    border: 1px solid #222;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.form-title {
    text-align: center;
    margin-top: 0;
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.2rem;
    letter-spacing: -1px;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    background: #151515;
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--lm-red);
    box-shadow: 0 0 12px rgba(155, 0, 15, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px dashed #444;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #111;
    color: #888;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.85rem;
}

.file-input-wrapper:hover {
    border-color: var(--lm-red);
    background: #1a0505;
    color: #fff;
}

.file-input-wrapper input[type="file"] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.form-submit-btn {
    background-color: var(--lm-red);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

.form-submit-btn:hover {
    background-color: #b30011;
    transform: scale(1.02);
}

#status {
    text-align: center;
    margin-top: 10px;
    color: #fff;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 0;
}

/* --- DRÓBNE KOMPONENTY HEADER/APP --- */
.btn-return {
    display: flex;
    align-items: center;
    gap: 5px;
    border-color: #444;
    padding: 8px 15px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
}

.brand-text {
    color: var(--lm-red);
}

.header-subtitle {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 2px;
}

.auth-views {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- TABELKA CENOWA APP.JS --- */
.price-breakdown {
    background-color: #0c0c0c;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #222;
}

.price-row {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.price-row.border-dashed {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #333;
}

.price-label {
    min-width: 100px;
    color: #888;
}

.price-value {
    color: #ddd;
}

.price-final {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 0;
}

.price-label-final {
    min-width: 100px;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.price-value-final {
    color: var(--lm-red);
    font-size: 1.4rem;
}

/* --- WIDOK MOICH OGŁOSZEŃ --- */
.my-card-title {
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 8px;
}

.status-active {
    color: #4CAF50;
}

.status-pending {
    color: #FF9800;
}

.status-sold {
    color: #f44336;
}

.status-inactive {
    color: #888;
}

.action-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-edit {
    background: #444;
    color: #fff;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.btn-delete {
    background: var(--lm-red);
    color: #fff;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.btn-edit:hover {
    background: #666;
}

.btn-delete:hover {
    opacity: 0.8;
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: center;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    background-color: #111;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 5px solid #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    pointer-events: auto;
    animation: slideUp 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transition: opacity 0.3s ease;
}

.toast.error {
    border-left-color: var(--lm-red);
}

.toast.success {
    border-left-color: #4CAF50;
}

.toast.warning {
    border-left-color: #FF9800;
}

.toast.info {
    border-left-color: #2196F3;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.2s;
    line-height: 1;
}

.toast-close:hover {
    color: var(--lm-red);
}

/* --- PRZYCISK NAZWY SPRZEDAJĄCEGO (SKLEP GRACZA) --- */
.seller-name-btn {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    text-transform: none;
    transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    max-width: 160px;
    text-overflow: ellipsis;
}

.seller-name-btn:hover {
    border-color: var(--lm-red) !important;
    color: #fff !important;
    transform: scale(1.05);
}

/* --- BANER FILTRA GRACZA --- */
.player-filter-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(155, 0, 15, 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--lm-red);
    margin: 0 20px;
    margin-top: 15px;
    border-radius: 0 4px 4px 0;
    animation: slideUp 0.25s ease forwards;
}

.player-filter-banner.active {
    display: flex;
}

.player-filter-title {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.player-filter-content strong {
    color: #fff;
    font-size: 1.1rem;
    display: block;
    margin-top: 2px;
    letter-spacing: 0;
}

.player-filter-content {
    flex: 1;
    min-width: 0;
}

.player-filter-bio {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 5px;
    font-style: italic;
    opacity: 0.8;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.player-filter-clear {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.player-filter-copy {
    background: var(--lm-red);
    border: 1px solid var(--lm-red);
    color: #fff;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 700;
}

.player-filter-copy:hover {
    background: #b30011;
    transform: scale(1.05);
}

.player-filter-clear:hover {
    border-color: var(--lm-red);
    color: #fff;
}

/* --- PANEL ADMINISTRATORA --- */
.admin-section {
    margin-bottom: 40px;
}

.admin-section h2 {
    color: var(--lm-red);
    font-family: 'Archivo Black', sans-serif;
    border-bottom: 1px solid #333;
    padding-top: 20px;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.admin-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-bottom: 2px solid var(--lm-red);
}

.admin-card-info {
    padding: 15px;
    flex-grow: 1;
}

.admin-card-title {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 5px;
}

.admin-card-sub {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}

.admin-actions {
    padding: 15px;
    background: #0a0a0a;
    display: flex;
    gap: 10px;
    border-top: 1px solid #222;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: opacity 0.2s;
}

.btn-yes {
    background: #4CAF50;
    color: #fff;
}

.btn-no {
    background: #f44336;
    color: #fff;
}

.action-btn:hover {
    opacity: 0.8;
}

.player-row {
    background: #111;
    border: 1px solid #333;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    margin-bottom: 10px;
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: bold;
    color: #fff;
}

.player-id {
    font-size: 0.7rem;
    color: #666;
}

.empty-state {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 40px;
    border: 1px dashed #333;
    border-radius: 4px;
    grid-column: 1/-1;
}

/* --- MOBILE POLISH & RESPONSIVENESS --- */

@media (max-width: 1200px) {
    .car-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    header h1 {
        font-size: 1.6rem;
    }

    .header-subtitle {
        font-size: 0.65rem;
    }

    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 8px 15px;
    }

    .header-subtitle {
        display: none;
    }

    .main-content-offset {
        height: 65px;
    }

    .nav-btn.header-nav-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .btn-return svg {
        display: none;
    }

    .player-filter-banner {
        margin: 15px 10px 0;
        padding: 10px 15px;
    }

    .player-filter-content strong {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    header {
        flex-wrap: wrap;
        padding: 12px 10px;
    }

    .header-left {
        display: contents;
    }

    .discord-btn {
        order: 1;
        flex: 0 0 auto;
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    .header-center {
        order: 2;
        position: absolute;
        left: 50%;
        top: 28px;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        min-width: 0;
        z-index: 10;
        width: auto;
        transition: none !important;
    }

    .header-center:hover,
    .header-center:active {
        transform: translate(-50%, -50%) scale(1) !important;
    }


    header h1 {
        font-size: 0.9rem !important;
        transform: none !important;
        margin: 0;
        white-space: nowrap;
    }

    #admin-btn,
    #admin-btn-logged-out {
        order: 3;
        flex: 0 0 auto;
        position: static;
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    .header-right {
        order: 4;
        flex: 0 0 100%;
        justify-content: center;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #1a1a1a;
    }

    .auth-views {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .auth-views .nav-btn {
        font-size: 0.62rem;
        padding: 6px 8px;
        flex: 0 1 auto;
    }

    .main-content-offset {
        height: 115px;
    }

    #main-back-btn {
        order: 1;
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    .controls-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px 15px 0;
    }

    .search-wrapper input {
        font-size: 0.85rem;
        padding: 12px;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .detail-header .price {
        font-size: 1.4rem !important;
    }

    .auth-modal {
        width: 95%;
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .form-container {
        width: 95%;
        padding: 20px 15px;
        margin: 10px auto;
    }

    .form-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    form#uploadForm>div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .car-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .brand-text {
        display: block;
        line-height: 1;
        margin-bottom: 2px;
    }

    .lm-card .info {
        padding: 15px;
    }

    .discord-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .seller-discord {
        padding: 5px 8px;
    }

    .player-filter-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .player-filter-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
}

/* Tooltip for Profile Discord ID */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: var(--lm-red);
    text-decoration: underline dotted;
    margin-left: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #151515;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    z-index: 1002;
    bottom: 125%; /* Position the tooltip above the text */
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--lm-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: normal;
    text-transform: none; /* Keep text as is */
    font-weight: 400;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Arrow for tooltip */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--lm-red) transparent transparent transparent;
}

/* --- PAGINATION --- */
.pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0 20px 0;
    padding: 20px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 12px;
    border: 1px solid #333;
}

.pagin-btn {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 120px;
}

.pagin-btn:hover:not(:disabled) {
    background: var(--lm-red);
    border-color: var(--lm-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

.pagin-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

.pagin-info {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Wymagane pola formularza - czerwona obwódka */
input:required,
select:required,
textarea:required {
    border-color: var(--lm-red) !important;
}
