/* ==========================================================================
   1. GRUND-ELEMENTE & GLOBALE THEMES
   ========================================================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.hub-body {
    padding: 0;
}

.dashboard-container, .hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#toast {
    z-index: 999999 !important;
}

/* --- THEME: DARK-MODE (Standard) --- */
body, body.theme-dark {
    background-color: #0f172a;
    color: #f8fafc;
}

body.theme-dark .sport-card,
body.theme-dark .group-item,
body.theme-dark .player-item,
body.theme-dark .col-tab,
body.theme-dark .team-card,
body.theme-dark .modal-content,
body.theme-dark .set-controls,
body.theme-dark .collection-table,
body.theme-dark table {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.theme-dark input,
body.theme-dark select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* --- THEME: LIGHT-MODE (Heller, matter Look & starke Lesbarkeit) --- */
body.theme-light {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

body.theme-light .sport-card,
body.theme-light .group-item,
body.theme-light .player-item,
body.theme-light .col-tab,
body.theme-light .team-card,
body.theme-light .modal-content,
body.theme-light .set-controls,
body.theme-light .collection-table,
body.theme-light table,
body.theme-light tr {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

body.theme-light h1, body.theme-light h2, body.theme-light h3, body.theme-light label {
    color: #0f172a !important;
}

body.theme-light span[style*="color: #94a3b8"],
body.theme-light div[style*="color: #94a3b8"],
body.theme-light .col-tab h3 {
    color: #475569 !important;
}

body.theme-light strong[style*="color: #60a5fa"],
body.theme-light .limit-input {
    color: #2563eb !important;
}

body.theme-light input,
body.theme-light select {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
}

/* --- THEME: COLOR-MODE (Bunt, lebendig & vielseitig) --- */
body.theme-color {
    background: linear-gradient(135deg, #3b0764 0%, #1e1b4b 50%, #065f46 100%) !important;
    background-attachment: fixed;
    color: #fce7f3 !important;
}

body.theme-color .sport-card,
body.theme-color .group-item,
body.theme-color .player-item,
body.theme-color .col-tab,
body.theme-color .team-card,
body.theme-color .modal-content,
body.theme-color .set-controls,
body.theme-color .collection-table,
body.theme-color table,
body.theme-color tr {
    background: rgba(30, 27, 75, 0.9) !important;
    border: 1px solid #a855f7 !important;
    color: #fae8ff !important;
    box-shadow: 0 6px 15px rgba(168, 85, 247, 0.15);
}

body.theme-color h1, body.theme-color h2, body.theme-color h3, body.theme-color label {
    color: #f472b6 !important;
}

body.theme-color h2 {
    border-bottom-color: #ec4899 !important;
}

body.theme-color strong[style*="color: #60a5fa"] {
    color: #38bdf8 !important;
}

body.theme-color .btn-ebay {
    background: linear-gradient(135deg, #8b5cf6, #ec4899) !important;
}

body.theme-color input,
body.theme-color select {
    background-color: #312e81 !important;
    color: #fce7f3 !important;
    border: 1px solid #c084fc !important;
}


/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    position: relative;
    padding: 20px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 1px;
    text-align: center;
}

h2 {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 8px;
    display: inline-block;
}

/* X-Schliessen / Zurück Button */
.btn-back {
    text-decoration: none;
    width: 36px;
    height: 48px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

body.theme-dark .btn-back {
    background-color: #1e293b !important;
    color: #ef4444 !important;
    border: 1px solid #334155 !important;
}
body.theme-dark .btn-back:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

body.theme-light .btn-back {
    background-color: #f8fafc !important;
    color: #ef4444 !important;
    border: 1px solid #94a3b8 !important;
}
body.theme-light .btn-back:hover {
    background-color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body.theme-color .btn-back {
    background-color: #312e81 !important;
    color: #ef4444 !important;
    border: 1px solid #c084fc !important;
}
body.theme-color .btn-back:hover {
    background-color: rgba(67, 56, 202, 0.9) !important;
    border-color: #f472b6 !important;
}


/* ==========================================================================
   3. MODALS & SETTINGS
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2005;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #334155;
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #94a3b8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.close-btn:hover {
    color: #ef4444;
}

.settings-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #94a3b8;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-select {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}


/* ==========================================================================
   4. BUTTONS (STANDARD, GEFAHR, EBAY, BILDER)
   ========================================================================== */
.btn-small {
    padding: 10px 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-small:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-danger:hover {
    background-color: #dc2626;
}

.btn-danger-small {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
}
.btn-danger-small:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

.btn-ebay {
    background-color: #2563eb;
    color: white;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: bold;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-ebay:hover {
    background-color: #1d4ed8;
}

/* Bild-Upload Buttons */
.btn-img {
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    margin-right: 8px;
}
body.theme-dark .btn-img {
    background-color: #334155;
    color: white;
}
body.theme-dark .btn-img:hover {
    background-color: #475569;
}
.btn-img.has-img {
    background-color: #8b5cf6;
}
.btn-img.has-img:hover {
    background-color: #7c3aed;
    transform: scale(1.05);
}

body.theme-light .btn-img {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}
body.theme-light .btn-img:hover {
    background-color: #cbd5e1 !important;
}

body.theme-color .btn-img {
    background-color: rgba(49, 46, 129, 0.9) !important;
    color: #fae8ff !important;
}
body.theme-color .btn-img:hover {
    background-color: rgba(67, 56, 202, 0.9) !important;
}


/* ==========================================================================
   5. TOGGLES & TRACKER (JAHRE & BESITZ-BUTTONS)
   ========================================================================== */
.year-toggle {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
}

body.theme-dark .year-toggle {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
}
body.theme-dark .year-toggle.active {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

body.theme-light .year-toggle {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #94a3b8 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
body.theme-light .year-toggle:hover {
    background-color: #e2e8f0 !important;
    border-color: #475569 !important;
}
body.theme-light .year-toggle.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
    font-weight: bold;
}

body.theme-color .year-toggle {
    background: rgba(79, 70, 229, 0.5) !important;
    color: #ffffff !important;
    border: 1.5px solid #d946ef !important;
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.25);
}
body.theme-color .year-toggle:hover {
    background: rgba(124, 58, 237, 0.8) !important;
    border-color: #f472b6 !important;
}
body.theme-color .year-toggle.active {
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    color: #ffffff !important;
    border-color: #f472b6 !important;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
    font-weight: bold;
}

/* Tracker-Buttons (Im Besitz / Have / Want) */
.tracker-btn-group {
    display: flex;
    gap: 6px;
    min-width: 180px;
}

.track-toggle {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #475569;
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    user-select: none;
    transition: all 0.2s;
    cursor: pointer;
}

/* --- 1. DARK-MODE (Dezentes Cyan / Blau passend zum Dark-Look) --- */
body.theme-dark .track-toggle {
    background: #334155;
    color: #cbd5e1;
}
body.theme-dark .track-toggle:hover {
    background: #475569;
}
body.theme-dark .track-toggle.have-active {
    background-color: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
}
body.theme-dark .track-toggle.want-active {
    background-color: #d97706 !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* --- 2. LIGHT-MODE (Kräftiges Profi-Blau passend zum Light-Look) --- */
body.theme-light .track-toggle {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}
body.theme-light .track-toggle:hover {
    background-color: #e2e8f0 !important;
}
body.theme-light .track-toggle.have-active {
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
body.theme-light .track-toggle.want-active {
    background-color: #d97706 !important;
    border-color: #b45309 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- 3. COLOR-MODE (Stylischer Pink/Lila-Farbverlauf passend zum Color-Look) --- */
body.theme-color .track-toggle {
    background-color: rgba(49, 46, 129, 0.8) !important;
    color: #fce7f3 !important;
    border-color: #a855f7 !important;
}
body.theme-color .track-toggle:hover {
    background-color: rgba(67, 56, 202, 0.9) !important;
}
body.theme-color .track-toggle.have-active {
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    border-color: #f472b6 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}
body.theme-color .track-toggle.want-active {
    background: linear-gradient(135deg, #d97706, #ec4899) !important;
    border-color: #f472b6 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}


/* ==========================================================================
   6. EINGABEFELDER & SUCHE
   ========================================================================== */
.limit-input {
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: bold;
    width: 70px;
    text-align: center;
    transition: all 0.2s;
}
.limit-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}
.limit-input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #334155;
}

.search-input {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.set-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.set-controls label {
    font-size: 16px;
    font-weight: 600;
}


/* ==========================================================================
   7. TOAST NOTIFICATIONS (BENACHRICHTIGUNGEN)
   ========================================================================== */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #10b981;
    color: white;
    text-align: center;
    border-radius: 30px;
    padding: 16px 25px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}


/* ==========================================================================
   8. MAIN HUB SPORTS GRID
   ========================================================================== */
.sports-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 50px;
    width: 100%;
}

.sport-card {
    border-radius: 16px;
    padding: 35px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.sport-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: transparent;
    transition: all 0.3s;
}
.sport-card.active:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: #475569;
}

/* Sport-spezifische Akzentlinien im Hub */
.sport-card[href="football.html"]::before { background: #3b82f6; }
.sport-card[href="f1.html"]::before { background: #ef4444; }
.sport-card[href="basketball.html"]::before { background: #f97316; }
.sport-card[href="soccer.html"]::before { background: #10b981; }
.sport-card[href="baseball.html"]::before { background: #0ea5e9; }
.sport-card[href="hockey.html"]::before { background: #06b6d4; }
.sport-card[href="wwe.html"]::before { background: #eab308; }

.sport-card .sport-icon {
    font-size: 55px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transition: transform 0.3s;
}
.sport-card:hover .sport-icon {
    transform: scale(1.1);
}
.sport-card h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}


/* ==========================================================================
   9. COLLECTION TABS (.col-tab)
   ========================================================================== */
.collection-section {
    margin-top: 40px;
    padding-top: 30px;
}

.col-tab-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.col-tab {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #334155;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.col-tab h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.col-tab span {
    font-size: 42px;
    font-weight: 800;
    display: block;
    line-height: 1;
}
.col-tab:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: #475569;
}

/* Dark-Mode Tabs */
body.theme-dark .col-tab.have.active { border-color: #10b981; background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), #1e293b); }
body.theme-dark .col-tab.have.active h3, body.theme-dark .col-tab.have.active span { color: #34d399; }
body.theme-dark .col-tab.want.active { border-color: #f59e0b; background: linear-gradient(145deg, rgba(245, 158, 11, 0.15), #1e293b); }
body.theme-dark .col-tab.want.active h3, body.theme-dark .col-tab.want.active span { color: #fbbf24; }

/* Light-Mode Tabs */
body.theme-light .col-tab.have.active { border-color: #10b981 !important; background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), #ffffff) !important; }
body.theme-light .col-tab.have.active h3, body.theme-light .col-tab.have.active span { color: #047857 !important; }
body.theme-light .col-tab.want.active { border-color: #f59e0b !important; background: linear-gradient(145deg, rgba(245, 158, 11, 0.15), #ffffff) !important; }
body.theme-light .col-tab.want.active h3, body.theme-light .col-tab.want.active span { color: #b45309 !important; }

/* Color-Mode Tabs */
body.theme-color .col-tab.have.active { border-color: #10b981 !important; background: linear-gradient(145deg, rgba(16, 185, 129, 0.3), rgba(30, 27, 75, 0.9)) !important; }
body.theme-color .col-tab.have.active h3, body.theme-color .col-tab.have.active span { color: #34d399 !important; }
body.theme-color .col-tab.want.active { border-color: #f59e0b !important; background: linear-gradient(145deg, rgba(245, 158, 11, 0.3), rgba(30, 27, 75, 0.9)) !important; }
body.theme-color .col-tab.want.active h3, body.theme-color .col-tab.want.active span { color: #fbbf24 !important; }


/* ==========================================================================
   10. LISTEN, AKKORDEONS & TABELLEN
   ========================================================================== */
.group-item, .player-item {
    border: 1px solid #334155;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid #3b82f6;
}
.group-item:hover, .player-item:hover {
    transform: translateX(4px);
    border-color: #475569;
}

.group-content, .cards-table-container {
    display: none;
    padding: 10px 0 25px 0;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.collection-table, table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.collection-table th, .collection-table td, th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #334155;
}
.collection-table th, th {
    background-color: rgba(0,0,0,0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}
.collection-table tr:hover td, tr:hover td {
    background-color: rgba(51, 65, 85, 0.15);
}
.collection-table tr:last-child td, tr:last-child td {
    border-bottom: none;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.team-card {
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 16px;
}
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: all 0.3s;
}
.team-card.has-data {
    cursor: pointer;
    font-weight: 600;
}
.team-card.has-data:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.3);
    border-color: #475569;
}

.team-logo-small {
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}
.team-logo-large {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}


/* ==========================================================================
   11. SPORT-SPEZIFISCHE THEMES
   ========================================================================== */
.theme-football h2 { border-bottom-color: #3b82f6; }
.theme-football .team-card.has-data::before { background: #3b82f6; }
.theme-football .player-item { border-left-color: #3b82f6; }

.theme-f1 h2 { border-bottom-color: #ef4444; }
.theme-f1 .team-card.has-data::before { background: #ef4444; }
.theme-f1 .player-item { border-left-color: #ef4444; }

.theme-basketball h2 { border-bottom-color: #f97316; }
.theme-basketball .team-card.has-data::before { background: #f97316; }
.theme-basketball .player-item { border-left-color: #f97316; }

.theme-soccer h2 { border-bottom-color: #10b981; }
.theme-soccer .team-card.has-data::before { background: #10b981; }
.theme-soccer .player-item { border-left-color: #10b981; }

.theme-baseball h2 { border-bottom-color: #0ea5e9; }
.theme-baseball .team-card.has-data::before { background: #0ea5e9; }
.theme-baseball .player-item { border-left-color: #0ea5e9; }

.theme-hockey h2 { border-bottom-color: #06b6d4; }
.theme-hockey .team-card.has-data::before { background: #06b6d4; }
.theme-hockey .player-item { border-left-color: #06b6d4; }

.theme-wwe h2 { border-bottom-color: #eab308; }
.theme-wwe .team-card.has-data::before { background: #eab308; }
.theme-wwe .player-item { border-left-color: #eab308; }


/* ==========================================================================
   12. JS-GENERIERTE ELEMENTE & INLINE OVERRIDES
   ========================================================================== */
body.theme-light .group-item,
body.theme-light .player-item,
body.theme-light div[style*="background: #0f172a"] {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}
body.theme-light div[style*="color: #f8fafc"] { color: #0f172a !important; }
body.theme-light div[style*="color: #94a3b8"] { color: #475569 !important; }
body.theme-light strong[style*="color: #60a5fa"] { color: #2563eb !important; }
body.theme-light span[style*="color: #cbd5e1"] { color: #334155 !important; }

body.theme-color .group-item,
body.theme-color .player-item,
body.theme-color div[style*="background: #0f172a"] {
    background: rgba(30, 27, 75, 0.9) !important;
    border: 1px solid #a855f7 !important;
}
body.theme-color div[style*="color: #f8fafc"] { color: #fae8ff !important; }
body.theme-color div[style*="color: #94a3b8"] { color: #fbcfe8 !important; }
body.theme-color strong[style*="color: #60a5fa"] { color: #38bdf8 !important; }
body.theme-color span[style*="color: #cbd5e1"] { color: #e2e8f0 !important; }


/* ==========================================================================
   13. MOBILE OPTIMIERUNG (RESPONSIVE DESIGN)
   ========================================================================== */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 22px !important;
    }
    header div span {
        font-size: 24px !important;
    }

    #teamGrid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    button, .btn-small, .btn-danger, select, input {
        min-height: 48px;
        font-size: 16px !important;
    }

    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
        padding: 15px !important;
    }

    /* Tabellen auf Smartphones in Block-Ansicht umwandeln */
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead tr {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        border: 1px solid #334155;
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(128,128,128,0.2);
        padding: 10px 0;
        text-align: right;
    }

    td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        gap: 10px;
        padding-bottom: 0;
        margin-top: 5px;
    }

    .tracker-btn-group {
        width: 100%;
        display: flex;
        gap: 5px;
    }
    .tracker-btn-group button {
        flex: 1;
    }
    .limit-input {
        width: 100px;
        text-align: center;
    }
}

/* ==========================================
   --- KARTENZEILE IN DER LISTENANSICHT ---
   ========================================== */
.card-row {
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    margin-bottom: 8px;
}

/* 1. Dark-Mode Design */
body.theme-dark .card-row, body:not([class*="theme-"]) .card-row {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}

/* 2. Light-Mode Design */
body.theme-light .card-row {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
body.theme-light .card-row strong {
    color: #2563eb !important; /* Seriennummer im Light-Mode blau */
}
body.theme-light .card-row span {
    color: #334155 !important; /* Typ-Text im Light-Mode dunkel */
}

/* 3. Color-Mode Design */
body.theme-color .card-row {
    background: rgba(30, 27, 75, 0.9) !important;
    border: 1px solid #a855f7 !important;
}
body.theme-color .card-row strong {
    color: #38bdf8 !important; /* Seriennummer im Color-Mode */
}
body.theme-color .card-row span {
    color: #e2e8f0 !important; /* Typ-Text im Color-Mode */
}

/* ==========================================
   --- KARTEN-ACTION-BUTTON (Z.B. ODDS / STERN) ---
   ========================================== */
.btn-card-action {
    height: 36px;
    width: 36px;
    min-height: 36px;
    min-width: 36px;
    max-height: 36px;
    max-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.2s;
}

/* 1. Dark-Mode */
body.theme-dark .btn-card-action {
    background: #1e293b;
    color: #3b82f6;
    border: 1px solid #334155;
}
body.theme-dark .btn-card-action:hover {
    background: #334155;
}

/* 2. Light-Mode */
body.theme-light .btn-card-action {
    background: #f8fafc;
    color: #2563eb;
    border: 1px solid #94a3b8;
}
body.theme-light .btn-card-action:hover {
    background: #e2e8f0;
}

/* 3. Color-Mode */
body.theme-color .btn-card-action {
    background: #312e81;
    color: #38bdf8;
    border: 1px solid #c084fc;
}
body.theme-color .btn-card-action:hover {
    background: rgba(67, 56, 202, 0.9);
}

/* ==========================================
   --- AUTH BUTTONS (LOGIN & REGISTRIERUNG) ---
   ========================================== */
.btn-auth {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    box-sizing: border-box;
    transition: all 0.2s;
    color: white; /* Einheitliche Textfarbe */
}

/* 1. Dark-Mode (Beide Buttons identisch in Blau) */
body.theme-dark .btn-register,
body.theme-dark .btn-login {
    background: #3b82f6;
}
body.theme-dark .btn-register:hover,
body.theme-dark .btn-login:hover {
    background: #2563eb;
}

/* 2. Light-Mode (Beide Buttons identisch in kräftigem Blau) */
body.theme-light .btn-register,
body.theme-light .btn-login {
    background: #2563eb;
}
body.theme-light .btn-register:hover,
body.theme-light .btn-login:hover {
    background: #1d4ed8;
}

/* 3. Color-Mode (Beide Buttons identisch mit Farbverlauf) */
body.theme-color .btn-register,
body.theme-color .btn-login {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}
body.theme-color .btn-register:hover,
body.theme-color .btn-login:hover {
    opacity: 0.9;
}