/* Reset und Grundeinstellungen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
}

/* Utility Klassen */
.hidden {
    display: none !important;
}

.optional-text {
    color: #6b7280;
    font-weight: normal;
}

/* Login Seite Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    padding: 1rem;
}

.login-box {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: #2563eb;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.logo i {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    font-weight: 500;
}

.login-form {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background-color: #f9fafb;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

.submit-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
    font-family: inherit;
}

.submit-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}


.submit-btn:active {
    background: #1e40af;
    transform: translateY(0);
}

.submit-btn, #toggleRegisterBtn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Hauptseite Layout */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* Spieltag Navigation */
.matchday-navigation {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    margin-bottom: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.matchday-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.matchday-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0;
}

.matchday-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.matchday-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.matchday-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.matchday-nav-btn i {
    width: 24px;
    height: 24px;
    color: white;
}

.matchday-info {
    text-align: center;
    flex: 1;
    margin: 0 1.5rem;
}

.matchday-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.matchday-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.matchday-number {
    font-size: 1.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    min-width: 3rem;
    display: inline-block;
}

.matchday-dates {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Sidebar Styles */
.sidebar {
    width: 18rem;
    background: white;
    border-right: 1px solid #e5e7eb;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 5rem;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .team-name,
.sidebar.collapsed .team-label,
.sidebar.collapsed .logout-btn span {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .nav-item i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.sidebar.collapsed .team-card {
    padding: 1rem;
}

.sidebar.collapsed .team-info {
    justify-content: center;
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    color: #6b7280;
    font-weight: bold;
}

.sidebar-toggle:hover {
    background: #e5e7eb;
    color: #374151;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo-icon {
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-logo-icon i {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    transition: opacity 0.3s ease;
}

.sidebar-user {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    background: none;
    text-align: left;
    font-weight: 500;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nav-item span {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: #f9fafb;
    color: #111827;
}

.nav-item.active {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.team-card {
    background: #f9fafb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-avatar {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.team-name {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.team-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #6b7280;
    background: none;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.logout-btn i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.logout-btn span {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.logout-btn:hover {
    color: #111827;
    background: #f9fafb;
}

/* Hauptinhalt Styles */
.main-content {
    flex: 1;
    padding: 2.5rem;
    max-width: calc(100vw - 18rem);
    overflow-x: auto;
    transition: max-width 0.3s ease;
}

.sidebar.collapsed + .main-content {
    max-width: calc(100vw - 5rem);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.page-description {
    font-size: 1.125rem;
    color: #6b7280;
    font-weight: 500;
}

/* Statistik Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.stat-value.blue {
    color: #2563eb;
}

.stat-value.green {
    color: #059669;
}

.stat-value.next-game {
    font-size: 1.25rem;
    color: #111827;
}

.stat-subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Content Cards */
.content-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.card-content {
    padding: 2rem;
}

.stat-value.gold { 
    color: #FFD700 !important; 
}

.stat-value.silver { 
    color: #C0C0C0 !important; 
}

.stat-value.bronze { 
    color: #CD7F32 !important; 
}

.next-game-opponent {
    font-size: 0.9em;
    font-weight: 600;
}

.stat-subtitle {
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

/* Liga Tabelle */
.league-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.table-row.user {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 1px solid #93c5fd;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.table-row:not(.user) {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.table-row:not(.user):hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.table-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.rank-badge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.rank-2 {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: white;
}

.rank-3 {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
}

.rank-other {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.team-details h4 {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.team-details p {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.points {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
}

/* Team Management Styles */
.team-value-display {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.team-value-display h3 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.team-value-display .value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Football Field Styles */
.football-field {
    background: #22c55e;
    border-radius: 1rem;
    padding: 2rem;
    min-height: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    border: 4px solid #ffffff;
    box-shadow: 
        inset 0 0 0 2px #16a34a,
        0 8px 24px rgba(0, 0, 0, 0.1);
}

.field-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.line-label {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.positions-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.player-position {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.player-position.empty {
    background: rgba(255, 255, 255, 0.9);
    border: 2px dashed #9ca3af;
    color: #6b7280;
}

.player-position.empty:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #2563eb;
    color: #2563eb;
    transform: scale(1.05);
}

.player-position.filled {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: 2px solid #1e40af;
}

.player-position.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.player-position .add-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

.player-name {
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    margin-bottom: 2px;
}

.player-club {
    font-size: 0.625rem;
    opacity: 0.8;
    line-height: 1;
}

.player-rating {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 4px;
    border-radius: 3px;
    margin-top: 2px;
}

/* Ersatzbank Styles */
.bench-section {
    margin-bottom: 2rem;
}

.bench-positions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bench-player {
    width: 100%;
    height: 60px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-align: center;
}

.bench-player.empty {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    color: #6b7280;
}

.bench-player.empty:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}

.bench-player.filled {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.75rem;
    justify-content: flex-start;
    gap: 0.75rem;
}

.bench-player.filled:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.player-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.player-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.player-details .player-name {
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.player-details .player-club {
    font-size: 0.75rem;
    opacity: 0.8;
}

.player-rating-bench {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-primary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Player Profile Modal */
.player-profile-modal {
    max-width: 600px;
}

.player-profile-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 1rem 1rem 0 0;
    margin: -2rem -2rem 2rem -2rem;
    position: relative;
}

.player-profile-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    margin: 0 auto 1rem auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.player-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.player-profile-position {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.player-profile-rating {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.player-profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.stat-item-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 0.25rem;
}

.player-profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    padding: 0.75rem 1.5rem;
}

.btn-warning:hover {
    background: #d97706;
}
/* Games View Styles */
.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.player-games-section {
    margin-bottom: 2rem;
}

.game-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.game-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.game-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.game-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.game-status {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-status.upcoming {
    background: #dbeafe;
    color: #1d4ed8;
}

.game-status.completed {
    background: #d1fae5;
    color: #047857;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.player-game-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.player-game-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.player-game-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.player-game-details h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.player-game-details p {
    font-size: 0.75rem;
    color: #6b7280;
}

.player-game-status {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-option {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-option.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.status-option.not-played.active {
    background: #dc2626;
    border-color: #dc2626;
}

.status-option:hover:not(.active) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.rating-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.rating-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rating-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #6b7280;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 20000;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #059669;
}

.notification.error {
    border-left-color: #dc2626;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #2563eb;
}

/* Team Pop-Up Styles (Phase 2, Schritt 2.1) */
.team-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.team-popup {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.team-popup-overlay.active .team-popup {
    transform: scale(1);
}

.popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.popup-content {
    padding: 24px;
}

/* Loading Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tab System (Phase 4.2) */
.tab-button.active {
    color: #667eea !important;
    border-bottom-color: #667eea !important;
}

.tab-button:hover {
    color: #5a67d8;
}

/* Player Cards */
.player-card {
    background: rgba(255, 255, 255, 0.9);  /* ← Leicht transparent */
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-card:hover {
    background: rgba(255, 255, 255, 1);  /* ← Bei Hover vollständig weiß */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.player-name {
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    font-size: 14px;
}

.player-position-badge {
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.player-info {
    font-size: 12px;
    color: #6b7280;
}

/* Schwarze Schrift bei Hover für bessere Lesbarkeit */
.player-card:hover .player-name {
    color: #1f2937;
}

/* Spieler-Details Animationen */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Enhanced Pop-Up Animationen (Phase 5.2) */
.team-popup-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.team-popup {
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-popup-overlay.active .team-popup {
    transform: scale(1) translateY(0);
}

/* Verbesserte Player Cards */
.player-card {
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.player-card:hover::before {
    left: 100%;
}

/* Verbesserte Mini Player Cards */
.mini-player-card {
    position: relative;
    overflow: hidden;
}

.mini-player-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.mini-player-card:hover::after {
    width: 100%;
    height: 100%;
}

/* Verbesserte Liga-Tabelle */
.table-row {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: height 0.3s ease;
}

.table-row:hover::before {
    height: 100%;
}

/* Loading Spinner Verbesserung */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Verbesserte Tab Buttons */
.tab-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-button.active::before {
    width: 100%;
}

.tab-button:hover:not(.active) {
    background: rgba(102, 126, 234, 0.05);
}

/* Nur für Pop-Up Mini-Field (spezifischer) */
.team-popup #fieldPositions {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    min-height: 360px;
}

.team-popup .position-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 60px;
    margin-bottom: 20px;
}

.team-popup .mini-field {
    background: linear-gradient(to bottom, #22c55e 0%, #16a34a 100%);
    border-radius: 12px;
    padding: 30px 20px;
    position: relative;
    min-height: 450px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}









/* ===== MOBILE RESPONSIVE STYLES - KORRIGIERT ===== */

/* Tablet Landscape */
@media screen and (max-width: 1024px) {
    .sidebar {
        width: 15rem;
    }
    
    .main-content {
        max-width: calc(100vw - 15rem);
        padding: 2rem;
    }
}

/* Mobile - FUNKTIONIERENDER ANSATZ */
@media screen and (max-width: 768px) {
    /* Body Styling für Mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Hauptinhalt - volle Breite */
    .main-content {
        max-width: 100%;
        width: 100%;
        padding: 1.5rem;
        margin-left: 0;
        transition: none;
    }
    
    /* Sidebar - OFF-SCREEN positioned */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;  /* Komplett links raus */
        width: 80%;   /* 80% der Bildschirmbreite */
        max-width: 320px;
        height: 100vh;
        background: white;
        z-index: 1000;
        box-shadow: none;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-right: 1px solid #e5e7eb;
        overflow-y: auto;
    }
    
    /* Sidebar OPEN State */
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
    }
    
    /* Mobile Overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Sidebar Content - Immer sichtbar */
    .sidebar .sidebar-header,
    .sidebar .sidebar-nav,
    .sidebar .sidebar-footer {
        display: flex !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar .sidebar-title,
    .sidebar .sidebar-user,
    .sidebar .nav-item span,
    .sidebar .team-name,
    .sidebar .team-label,
    .sidebar .logout-btn span {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Originalen Toggle Button verstecken */
    .sidebar .sidebar-toggle {
        display: none !important;
    }
    
    /* Stats Grid für Mobile */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    /* Matchday Navigation */
    .matchday-container {
        padding: 1rem 1.5rem;
        max-width: 350px;
    }
}

/* Mobile Klein */
@media screen and (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .sidebar {
        width: 85%;
        max-width: 280px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .matchday-container {
        padding: 0.75rem 1rem;
        max-width: 300px;
    }
}

/* Mobile Toggle Button */
#mobileToggleButton {
    display: none;
}

@media screen and (max-width: 768px) {
    #mobileToggleButton {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1001 !important;
    }
    
    #mobileToggleButton:hover {
        background: #1d4ed8 !important;
        transform: scale(1.05);
    }
}

/* ===== TOUCH OPTIMIERUNG ===== */

/* Alle Buttons für Touch optimieren */
@media screen and (max-width: 768px) {
    /* Mindestgröße für alle klickbaren Elemente */
    .nav-item,
    .matchday-nav-btn,
    .submit-btn,
    .tab-button,
    button {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Navigation Items größer machen */
    .nav-item {
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Spieltag Navigation Buttons */
    .matchday-nav-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.25rem !important;
    }
    
    /* Formulareingaben */
    .form-input {
        padding: 1.25rem !important;
        font-size: 1.1rem !important;
        min-height: 52px !important;
    }
    
    /* Submit Buttons */
    .submit-btn {
        padding: 1.25rem 2rem !important;
        font-size: 1.1rem !important;
        min-height: 52px !important;
    }
    
    /* Logout Button */
    .logout-btn {
        padding: 1rem !important;
        min-height: 52px !important;
    }
    
    /* Verbesserte Touch-Ziele für kleine Elemente */
    .close-btn,
    .modal-close,
    .sidebar-toggle {
        min-width: 48px !important;
        min-height: 48px !important;
        padding: 0.75rem !important;
    }
}

/* ===== TOUCH-FREUNDLICHE HOVER EFFEKTE ===== */

/* ===== HOVER-EFFEKTE NUR FÜR DESKTOP ===== */
@media (hover: hover) and (pointer: fine) {
    .nav-item:hover {
        background: #f9fafb;
        color: #111827;
    }
    
    .stat-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .submit-btn:hover {
        background: #1d4ed8;
        box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
        transform: translateY(-2px);
    }
    
    .logout-btn:hover {
        color: #111827;
        background: #f9fafb;
    }
    
    .matchday-nav-btn:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
}

/* Touch-Feedback für Mobile */
@media screen and (max-width: 768px) {
    /* Active States für Touch */
    .nav-item:active {
        background: #e0e7ff !important;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    .submit-btn:active {
        transform: scale(0.98);
        background: #1d4ed8 !important;
    }
    
    .matchday-nav-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Touch-Feedback für Cards */
    .stat-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Bessere Touch-Ziele für kleine Elemente */
    .close-btn:active,
    .modal-close:active {
        background: #f3f4f6 !important;
        transform: scale(0.9);
    }
}

/* ===== BUTTON NAVIGATION OPTIMIERUNG ===== */

@media screen and (max-width: 768px) {
    /* Spieltag-Navigation Buttons noch größer und besser sichtbar */
    .matchday-navigation {
        padding: 1.25rem 1rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .matchday-nav-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 1.4rem !important;
        border-radius: 1rem !important;
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
    }
    
    .matchday-nav-btn:active {
        transform: scale(0.92) !important;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Navigation zwischen Ansichten */
    .nav-item {
        border-radius: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .nav-item i {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    /* Tab Buttons falls vorhanden */
    .tab-button {
        padding: 1rem 1.5rem !important;
        min-height: 52px !important;
        font-size: 1rem !important;
        border-radius: 0.75rem !important;
    }
    
    /* Bessere Sichtbarkeit für disabled Buttons */
    .matchday-nav-btn:disabled {
        opacity: 0.3 !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Mobile Toggle Button optimieren */
    #mobileToggleButton {
        width: 3.5rem !important;
        height: 3.5rem !important;
        font-size: 1.3rem !important;
        border-radius: 1rem !important;
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
    }
    
    #mobileToggleButton:active {
        transform: scale(0.9) !important;
    }
}

/* ===== PHASE 2: LAYOUT-ANPASSUNGEN ===== */

@media screen and (max-width: 768px) {
    /* Tabellen horizontal scrollbar machen */
    .league-table,
    .content-card .card-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .league-table table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    
    .league-table th,
    .league-table td {
        padding: 0.75rem 0.5rem !important;
        white-space: nowrap;
    }
    
    /* Statistik Cards Stack-Layout */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem !important;
    }
    
    /* Content Cards kompakter */
    .content-card {
        margin-bottom: 1.5rem;
        border-radius: 1rem;
    }
    
    .card-header {
        padding: 1.5rem 1.5rem 1rem !important;
    }
    
    .card-content {
        padding: 0 1.5rem 1.5rem !important;
    }
    
    .card-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }
    
    /* Page Header kompakter */
    .page-header {
        margin-bottom: 1.5rem !important;
        text-align: center;
    }
    
    .page-title {
        font-size: 1.875rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .page-description {
        font-size: 1rem !important;
    }
}

@media screen and (max-width: 480px) {
    /* Noch kompakter für sehr kleine Bildschirme */
    .stat-card {
        padding: 1.25rem !important;
    }
    
    .stat-value {
        font-size: 1.75rem !important;
    }
    
    .card-header {
        padding: 1.25rem 1.25rem 0.75rem !important;
    }
    
    .card-content {
        padding: 0 1.25rem 1.25rem !important;
    }
    
    .league-table table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .league-table th,
    .league-table td {
        padding: 0.5rem 0.25rem !important;
    }
}

/* ===== FORMULARE UND MODALS FÜR MOBILE ===== */

@media screen and (max-width: 768px) {
    /* Modal/Pop-up Optimierung */
    .team-popup,
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 1rem !important;
        max-height: 90vh !important;
        border-radius: 1rem !important;
    }
    
    .popup-header,
    .modal-header {
        padding: 1.5rem !important;
        border-radius: 1rem 1rem 0 0 !important;
    }
    
    .popup-header h2,
    .modal-header h2 {
        font-size: 1.5rem !important;
    }
    
    /* Formulare optimieren */
    .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    .form-label {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Select Dropdowns */
    select {
        padding: 1.25rem !important;
        font-size: 1.1rem !important;
        min-height: 52px !important;
        border-radius: 0.75rem !important;
    }
    
    /* Textarea */
    textarea {
        padding: 1.25rem !important;
        font-size: 1.1rem !important;
        min-height: 120px !important;
        border-radius: 0.75rem !important;
        resize: vertical;
    }
    
    /* Button Groups */
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .button-group button {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media screen and (max-width: 480px) {
    /* Noch kompakter für sehr kleine Bildschirme */
    .team-popup,
    .modal-content {
        width: 98% !important;
        margin: 0.5rem !important;
    }
    
    .popup-header,
    .modal-header {
        padding: 1.25rem !important;
    }
    
    .popup-header h2,
    .modal-header h2 {
        font-size: 1.25rem !important;
    }
}

/* ===== FUSSBALLFELD MOBILE OPTIMIERUNG ===== */

@media screen and (max-width: 768px) {
    /* Team-Ansicht Grid-Layout anpassen */
    .team-view-grid,
    div[style*="grid-template-columns: 1fr 320px"] {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    /* Fußballfeld Container */
    .football-field {
        min-height: 400px !important;
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    /* Field Lines kompakter */
    .field-line {
        margin-bottom: 1rem !important;
    }
    
    .line-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Positions Row */
    .positions-row {
        gap: 0.75rem !important;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Player Cards im Feld */
    .player-card,
    .position-slot {
        min-width: 65px !important;
        min-height: 65px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }
    
    /* Team Value Display */
    .team-value-display {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    
    .team-value-display .value {
        font-size: 1.5rem !important;
    }
    
    /* Sidebar Bereiche in Team-Ansicht */
    .team-sidebar {
        width: 100% !important;
        margin-top: 1.5rem;
        order: 2;
    }
    
    /* Formation Buttons */
    .formation-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        margin: 1rem 0;
    }
    
    .formation-buttons button {
        min-width: 80px !important;
        padding: 0.75rem 1rem !important;
    }
}

@media screen and (max-width: 480px) {
    /* Sehr kleine Bildschirme */
    .football-field {
        min-height: 350px !important;
        padding: 1rem 0.5rem !important;
    }
    
    .player-card,
    .position-slot {
        min-width: 60px !important;
        min-height: 60px !important;
        font-size: 0.75rem !important;
    }
    
    .positions-row {
        gap: 0.5rem !important;
    }
    
    .team-value-display .value {
        font-size: 1.25rem !important;
    }
}

/* ===== PHASE 3: SPEZIELLE MOBILE FEATURES ===== */

/* Touch-optimierte Spieler-Interaktion */
@media screen and (max-width: 768px) {
    /* Drag & Drop für Mobile optimieren */
    .player-card,
    .position-slot {
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        border: 2px solid transparent !important;
    }
    
    .player-card:active {
        transform: scale(1.05) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
        z-index: 1000 !important;
        border-color: #2563eb !important;
    }
    
    .position-slot:active {
        background: rgba(37, 99, 235, 0.1) !important;
        border-color: #2563eb !important;
        transform: scale(1.02) !important;
    }
    
    /* Verbesserte Drop-Zonen */
    .position-slot.drag-over {
        background: rgba(37, 99, 235, 0.2) !important;
        border-color: #2563eb !important;
        animation: pulse-border 0.5s infinite !important;
    }
    
    @keyframes pulse-border {
        0%, 100% { border-color: #2563eb; }
        50% { border-color: #60a5fa; }
    }
    
    /* Touch-Feedback für Spieler-Cards */
    .mini-player-card {
        transition: all 0.2s ease !important;
        border-radius: 0.75rem !important;
    }
    
    .mini-player-card:active {
        transform: scale(0.95) !important;
        background: rgba(37, 99, 235, 0.05) !important;
    }
    
    /* Bessere Sichtbarkeit für ausgewählte Spieler */
    .player-card.selected {
        border-color: #059669 !important;
        box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2) !important;
    }
}

/* ===== PERFORMANCE OPTIMIERUNG - FINAL ===== */

@media screen and (max-width: 768px) {
    /* Hardware-Beschleunigung für Animationen */
    .sidebar,
    .mobile-overlay,
    #mobileToggleButton,
    .player-card,
    .stat-card {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Reduzierte Animationen für bessere Performance */
    .sidebar {
        transition: left 0.3s ease;
    }
    
    .mobile-overlay {
        transition: opacity 0.2s ease;
    }
    
    /* Optimierte Schatten für Mobile */
    .content-card,
    .stat-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .content-card:active,
    .stat-card:active {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Smooth Scrolling */
    .main-content,
    .sidebar,
    .league-table {
        scroll-behavior: smooth;
    }
    
    /* Bilder responsive machen */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Touch-Scrolling für Tabellen */
    .league-table {
        overflow-x: auto;
        scrollbar-width: thin;
    }
    
    /* Webkit Scrollbar Styling */
    .league-table::-webkit-scrollbar {
        height: 6px;
    }
    
    .league-table::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }
    
    .league-table::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
    
    .league-table::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}

/* ===== ACCESSIBILITY UND USABILITY ===== */

@media screen and (max-width: 768px) {
    /* Verbesserte Fokus-Indikatoren */
    button:focus,
    .nav-item:focus,
    .form-input:focus {
        outline: 3px solid #60a5fa !important;
        outline-offset: 2px !important;
    }
    
    /* Bessere Kontraste für kleine Bildschirme */
    .page-description,
    .stat-subtitle {
        color: #4b5563 !important;
        font-weight: 500 !important;
    }
    
    /* Vergrößerte Click-Areas */
    .close-btn,
    .modal-close {
        padding: 1rem !important;
        margin: 0.5rem !important;
    }
    
    /* Status-Indikatoren deutlicher */
    .nav-item.active {
        border-left: 4px solid #2563eb !important;
        background: #dbeafe !important;
    }
    
    /* Loading States */
    .loading {
        position: relative;
        overflow: hidden;
    }
    
    .loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: loading-shimmer 2s infinite;
    }
    
    @keyframes loading-shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
    
    /* Error States */
    .error-message {
        background: #fef2f2 !important;
        color: #dc2626 !important;
        padding: 1rem !important;
        border-radius: 0.75rem !important;
        border-left: 4px solid #dc2626 !important;
        margin: 1rem 0 !important;
    }
    
    /* Success States */
    .success-message {
        background: #f0fdf4 !important;
        color: #059669 !important;
        padding: 1rem !important;
        border-radius: 0.75rem !important;
        border-left: 4px solid #059669 !important;
        margin: 1rem 0 !important;
    }
}

/* ===== PHASE 4: TESTING UND DEBUG TOOLS ===== */

/* Debug-Hilfen (können später entfernt werden) */
.debug-info {
    position: fixed;
    top: 80px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    z-index: 9999;
    display: none;
}

@media screen and (max-width: 768px) {
    .debug-info {
        display: block;
    }
}



/* ===== IPAD PRO OPTIMIERUNG ===== */

/* iPad Pro spezifische Anpassungen */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* iPad Pro sollte mobile Navigation haben */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 60% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 1000 !important;
        box-shadow: none !important;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        border-right: 1px solid #e5e7eb !important;
        overflow-y: auto !important;
    }
    
    .sidebar.mobile-open {
        left: 0 !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Mobile Toggle Button für iPad anzeigen */
    #mobileToggleButton {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1001 !important;
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.2rem !important;
        border-radius: 0.75rem !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    }
    
    /* Mobile Overlay für iPad */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Hauptinhalt für iPad */
    .main-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 2rem !important;
        margin-left: 0 !important;
    }
    
    /* Originalen Sidebar Toggle verstecken */
    .sidebar .sidebar-toggle {
        display: none !important;
    }
    
    /* Sidebar Content sichtbar machen */
    .sidebar .sidebar-header,
    .sidebar .sidebar-nav,
    .sidebar .sidebar-footer {
        display: flex !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar .sidebar-title,
    .sidebar .sidebar-user,
    .sidebar .nav-item span,
    .sidebar .team-name,
    .sidebar .team-label,
    .sidebar .logout-btn span {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Stats Grid für iPad - 2 Spalten */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Buttons optimal für iPad Touch */
    .nav-item,
    .matchday-nav-btn,
    .submit-btn,
    button {
        min-height: 48px !important;
        min-width: 48px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Navigation Items größer */
    .nav-item {
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Team-Layout für iPad anpassen */
    .team-view-grid,
    div[style*="grid-template-columns: 1fr 320px"] {
        display: grid !important;
        grid-template-columns: 1fr 350px !important;
        gap: 2rem !important;
    }
    
    /* Fußballfeld für iPad */
    .football-field {
        min-height: 500px !important;
        padding: 2rem 1.5rem !important;
    }
    
    /* Matchday Navigation für iPad */
    .matchday-container {
        padding: 1.25rem 2rem !important;
        max-width: 450px !important;
    }
    
    .matchday-nav-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.25rem !important;
    }
}

/* iPad Pro Landscape (1366x1024) */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: landscape) {
    /* Bei Landscape kann normale Desktop-Navigation verwendet werden */
    .sidebar {
        position: sticky !important;
        left: 0 !important;
        width: 16rem !important;
    }
    
    #mobileToggleButton {
        display: none !important;
    }
    
    .main-content {
        max-width: calc(100vw - 16rem) !important;
        margin-left: 0 !important;
    }
}

/* ===== iPAD PRO SPEZIFISCHE MEDIA QUERIES ===== */

/* iPad Pro 12.9" Querformat (1366x1024) - MOBILE NAVIGATION */
@media screen and (width: 1366px) and (height: 1024px) and (orientation: landscape) {
    /* iPad Pro soll mobile Navigation verwenden */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 60% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 1000 !important;
        box-shadow: none !important;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        border-right: 1px solid #e5e7eb !important;
        overflow-y: auto !important;
    }
    
    .sidebar.mobile-open {
        left: 0 !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Mobile Toggle Button für iPad Pro anzeigen */
    #mobileToggleButton {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1001 !important;
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.2rem !important;
        border-radius: 0.75rem !important;
        background: #2563eb !important;
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    }
    
    /* Mobile Overlay für iPad Pro */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Hauptinhalt für iPad Pro */
    .main-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 2rem !important;
        margin-left: 0 !important;
    }
}

/* iPad Pro 11" Querformat (1194x834) - MOBILE NAVIGATION */
@media screen and (width: 1194px) and (height: 834px) and (orientation: landscape) {
    /* Gleiche Regeln wie für iPad Pro 12.9" */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 60% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 1000 !important;
        box-shadow: none !important;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        border-right: 1px solid #e5e7eb !important;
        overflow-y: auto !important;
    }
    
    .sidebar.mobile-open {
        left: 0 !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3) !important;
    }
    
    #mobileToggleButton {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1001 !important;
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.2rem !important;
        border-radius: 0.75rem !important;
        background: #2563eb !important;
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    .main-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 2rem !important;
        margin-left: 0 !important;
    }
}

/* Generische iPad Pro Regel für alle Zwischengrößen */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (max-height: 1024px) {
    /* Wenn Touch-Support erkannt wird, mobile Navigation verwenden */
    @supports (pointer: coarse) {
        .sidebar {
            position: fixed !important;
            top: 0 !important;
            left: -100% !important;
            width: 60% !important;
            max-width: 400px !important;
            height: 100vh !important;
            background: white !important;
            z-index: 1000 !important;
            box-shadow: none !important;
            transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
            border-right: 1px solid #e5e7eb !important;
            overflow-y: auto !important;
        }
        
        .sidebar.mobile-open {
            left: 0 !important;
            box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3) !important;
        }
        
        #mobileToggleButton {
            display: flex !important;
            position: fixed !important;
            top: 1rem !important;
            left: 1rem !important;
            z-index: 1001 !important;
            width: 3rem !important;
            height: 3rem !important;
            font-size: 1.2rem !important;
            border-radius: 0.75rem !important;
            background: #2563eb !important;
            color: white !important;
            border: none !important;
            cursor: pointer !important;
            align-items: center !important;
            justify-content: center !important;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
        }
        
        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .mobile-overlay.active {
            display: block !important;
            opacity: 1 !important;
        }
        
        .main-content {
            max-width: 100% !important;
            width: 100% !important;
            padding: 2rem !important;
            margin-left: 0 !important;
        }
    }
}

/* Touch-optimierte Buttons für iPad Pro */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (max-height: 1024px) {
    /* Alle Buttons für Touch optimieren */
    .nav-item,
    .matchday-nav-btn,
    .submit-btn,
    button {
        min-height: 48px !important;
        min-width: 48px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Navigation Items größer */
    .nav-item {
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Stats Grid für iPad - 2 Spalten */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Team-Layout für iPad anpassen */
    .team-view-grid,
    div[style*="grid-template-columns: 1fr 320px"] {
        display: grid !important;
        grid-template-columns: 1fr 350px !important;
        gap: 2rem !important;
    }
    
    /* Fußballfeld für iPad */
    .football-field {
        min-height: 500px !important;
        padding: 2rem 1.5rem !important;
    }
    
    /* Matchday Navigation für iPad */
    .matchday-container {
        padding: 1.25rem 2rem !important;
        max-width: 450px !important;
    }
    
    .matchday-nav-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.25rem !important;
    }
}

/* Debug-Hilfe für iPad Pro (kann später entfernt werden) */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (max-height: 1024px) {
    .debug-info-ipad {
        position: fixed;
        top: 80px;
        right: 10px;
        background: rgba(255, 0, 0, 0.8);
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        font-size: 0.75rem;
        z-index: 9999;
        display: block;
    }
}

/* Originale Desktop Regel überschreiben */
@media screen and (min-width: 1367px) {
    /* Nur echte Desktop-Geräte verwenden normale Desktop-Navigation */
    .sidebar {
        position: sticky !important;
        left: 0 !important;
        width: 16rem !important;
    }
    
    #mobileToggleButton {
        display: none !important;
    }
    
    .main-content {
        max-width: calc(100vw - 16rem) !important;
        margin-left: 0 !important;
    }
}

/* ===== NEUE STYLES FÜR SPIELER-RANKING ===== */

/* Dual Table Container */
.dual-table-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .dual-table-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Liga-Tabelle Anpassungen */
.league-table-container {
    flex: 1;
    min-width: 300px;
}

/* Player Ranking Styles */
.player-ranking-container {
    flex: 1.2;
    min-width: 350px;
}

.ranking-table {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.ranking-header {
    margin-bottom: 1rem;
}

.ranking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #f3f4f6;
    background: #fafafa;
    transition: all 0.2s ease;
}

.ranking-row:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ranking-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.ranking-right {
    display: flex;
    align-items: center;
}

.player-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

.player-details p {
    margin: 0 0 0.125rem 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.2;
}

.player-details small {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 500;
}

.rating-info {
    text-align: right;
}

.avg-rating {
    font-size: 1.125rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
}

.rating-info small {
    display: block;
    font-size: 0.6875rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Rank Badge für Player Ranking */
.ranking-row .rank-badge {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* Rank Badge Farben */
.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b8722c);
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.rank-other {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

/* Responsive Anpassungen */
@media (max-width: 1024px) {
    .dual-table-container {
        gap: 1.5rem;
    }
    
    .player-details h4 {
        font-size: 0.8125rem;
    }
    
    .avg-rating {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .ranking-row {
        padding: 0.625rem;
    }
    
    .player-details h4 {
        font-size: 0.75rem;
    }
    
    .player-details p {
        font-size: 0.6875rem;
    }
    
    .avg-rating {
        font-size: 0.9375rem;
    }
}

/* ===== SCOUTING STYLES ===== */

.scouting-container {
    max-width: 100%;
    margin-top: 1rem;
}

.scouted-player-card {
    transition: all 0.2s ease;
}

.scouted-player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.scouted-player-actions {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.scouted-player-card:hover .scouted-player-actions {
    opacity: 1;
}

.btn-small {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Anpassung für mobile Geräte */
@media (max-width: 768px) {
    .scouted-player-actions {
        opacity: 1;
    }

    .btn-small {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}