/* Alap stílusok */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #e9f5ff;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Einheitliche Tabellenstile */
.table-responsive {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background: white;
}

.table-responsive th,
.table-responsive td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table-responsive th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.table-responsive tr:last-child td {
    border-bottom: none;
}

.table-responsive tr:hover {
    background-color: #f8f9fa;
}

/* Container für Tabellensektionen */
.monthly-stats,
.content,
.runners-table,
.races-table,
.segments-table,
.data-table,
.stats-section {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Einheitliche Überschriften für Tabellensektionen */
.monthly-stats h2,
.content h2,
.runners-table h2,
.races-table h2,
.segments-table h2,
.data-table h2,
.stats-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monthly-stats h2 i,
.content h2 i,
.runners-table h2 i,
.races-table h2 i,
.segments-table h2 i,
.data-table h2 i,
.stats-section h2 i {
    color: #007bff;
}

/* Oszlop szélességek - Desktop */
.monthly-stats table th:nth-child(1),
.monthly-stats table td:nth-child(1) {
    width: 30%;
}

/* Hónap */
.monthly-stats table th:nth-child(2),
.monthly-stats table td:nth-child(2) {
    width: 20%;
}

/* Futások száma */
.monthly-stats table th:nth-child(3),
.monthly-stats table td:nth-child(3) {
    width: 25%;
}

/* Összes táv */
.monthly-stats table th:nth-child(4),
.monthly-stats table td:nth-child(4) {
    width: 25%;
}

/* Átlagos táv */

.content table th:nth-child(1),
.content table td:nth-child(1) {
    width: 30%;
}

/* Dátum */
.content table th:nth-child(2),
.content table td:nth-child(2) {
    width: 25%;
}

/* Távolság */
.content table th:nth-child(3),
.content table td:nth-child(3) {
    width: 45%;
}

/* Műveletek */

/* Űrlapok */
form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Gombok */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Üzenetek */
.alert {
    padding: 12px;
    margin: 20px 0;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Linkek */
.location-link {
    color: #007bff;
    text-decoration: none;
}

.location-link:hover {
    text-decoration: underline;
}

/* Reszponzív design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
    }

    .stats-table {
        grid-template-columns: 1fr;
    }

    .monthly-stats,
    .content,
    .runners-table,
    .races-table,
    .segments-table,
    .data-table,
    .stats-section {
        margin: 15px auto;
        padding: 15px;
    }

    .monthly-stats h2,
    .content h2,
    .runners-table h2,
    .races-table h2,
    .segments-table h2,
    .data-table h2,
    .stats-section h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .table-responsive {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    table {
        min-width: 100% !important;
    }

    th,
    td {
        padding: 8px;
        font-size: 13px;
    }

    /* Havi statisztikák táblázat */
    .monthly-stats table th,
    .monthly-stats table td {
        padding: 6px;
        font-size: 12px;
    }

    .monthly-stats table th:nth-child(1),
    .monthly-stats table td:nth-child(1) {
        width: 35%;
    }

    .monthly-stats table th:nth-child(2),
    .monthly-stats table td:nth-child(2) {
        width: 20%;
    }

    .monthly-stats table th:nth-child(3),
    .monthly-stats table td:nth-child(3) {
        width: 22%;
    }

    .monthly-stats table th:nth-child(4),
    .monthly-stats table td:nth-child(4) {
        width: 23%;
    }

    /* Futások listája táblázat */
    .content table th,
    .content table td {
        padding: 6px;
        font-size: 12px;
    }

    .content table th:nth-child(1),
    .content table td:nth-child(1) {
        width: 35%;
    }

    .content table th:nth-child(2),
    .content table td:nth-child(2) {
        width: 25%;
    }

    .content table th:nth-child(3),
    .content table td:nth-child(3) {
        width: 40%;
    }

    /* Button group in table cells */
    .button-group {
        flex-wrap: wrap;
        gap: 4px;
    }

    .button-group .btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .button-group .btn i {
        margin-right: 4px;
        font-size: 12px;
    }
}

/* Még kisebb képernyők */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .stat-box {
        padding: 15px;
        height: 80px;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
        margin-right: 10px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 11px;
    }

    th,
    td {
        padding: 4px;
        font-size: 12px;
    }

    .monthly-stats table th,
    .monthly-stats table td,
    .content table th,
    .content table td {
        padding: 4px;
        font-size: 11px;
    }

    .button-group .btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .button-group .btn i {
        margin-right: 3px;
        font-size: 11px;
    }
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stats-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 1200px;
}

.stat-cell {
    width: 100%;
}

.stat-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100px;
    border: 1px solid #e9ecef;
    width: 100%;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    background: #f8f9fa;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.stat-content {
    flex-grow: 1;
    text-align: left;
    min-width: 0;
}

/* Versenyekhez upcoming_races_section.php */
.stat-content-race {
    flex-grow: 1;
    text-align: left;
    min-width: 0;
    background-color: #ffc107;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-subtext {
    color: #6c757d;
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.8;
}

/* SIKERÜLT! felirat stílusa */
.stat-box .stat-value:contains('SIKERÜLT!') {
    color: #f1c40f;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Ha a fenti nem működne minden böngészőben, akkor használhatjuk ezt is: */
.stat-box .stat-icon .fa-trophy {
    color: #ffc107;
    /* Arany színű trófea */
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.button-group .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.button-group .btn i {
    margin-right: 6px;
    font-size: 13px;
}

/* Táblázat stílusok */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* Kisebb gombok a táblázatban */
.btn-small {
    padding: 4px 8px;
    font-size: 0.9em;
}

/* Veszélyes műveletek gombja */
.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Üzenetek stílusai */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 1.2em;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Fejléc stílusok */
.main-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.logo-container {
    order: 2;
    flex-shrink: 0;
}

.site-logo {
    max-width: 80px;
    height: auto;
}

.header-content {
    flex-grow: 1;
    order: 1;
    text-align: center;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-container {
    order: 2;
    flex-shrink: 0;
}

.header-text {
    order: 1;
    flex-grow: 1;
    text-align: center;
}

.site-logo {
    max-width: 80px;
    height: auto;
}

.header-content h1 {
    margin: 0;
    color: #1565c0;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-content p {
    margin: 5px 0 0;
    color: #1976d2;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-actions {
    flex-basis: 100%;
    margin-top: 30px;
    order: 3;
}

/* Responsive Anpassungen für den Header */
@media (max-width: 768px) {
    .main-header {
        gap: 15px;
    }

    .site-logo {
        max-width: 60px;
    }

    .header-content {
        padding: 10px;
        gap: 15px;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .header-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        gap: 10px;
    }

    .site-logo {
        max-width: 50px;
    }

    .header-content {
        padding: 8px;
        gap: 10px;
    }

    .header-content h1 {
        font-size: 1.2rem;
    }

    .header-content p {
        font-size: 0.7rem;
    }
}

/* Admin menü kártyák */
.admin-section {
    margin: 30px 0;
}

.admin-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.admin-card i {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #007bff;
}

.admin-card h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.admin-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

/* Admin gombok */
.admin-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.admin-buttons .btn-large,
.admin-buttons .btn-primary.btn-large {
    /* Növeljük a specificitást */
    padding: 20px;
    text-align: left;
    height: auto;
    transition: all 0.3s ease;
    background-color: #007bff !important;
    /* Felülírjuk az alapértelmezett stílust */
    color: white !important;
    opacity: 1;
    display: block;
    border: none;
}

.admin-buttons .btn-large:hover,
.admin-buttons .btn-primary.btn-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: #0056b3 !important;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-content i {
    font-size: 2em;
    margin: 0;
    color: white;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.btn-description {
    font-size: 0.9em;
    opacity: 0.9;
    color: white;
}

/* Reszponzív igazítások */
@media (max-width: 768px) {
    .btn-large {
        text-align: center;
    }
    
    .btn-content {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-text {
        align-items: center;
    }
}

/* Admin szekciók */
.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 30px 0;
}

.admin-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-section h2 i {
    color: #007bff;
}

.admin-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.btn-large {
    padding: 20px;
    text-align: left;
    height: auto;
    transition: all 0.3s ease;
    background: white;
}

.btn-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-content i {
    font-size: 2em;
    margin: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.btn-description {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    min-width: 120px;
}

/* Table actions */
.table-actions {
    display: flex;
    gap: 5px;
}

.table-actions .btn {
    padding: 4px 8px;
    font-size: 0.9em;
}

/* Általános gomb igazítások */
.btn i {
    margin-right: 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.9em;
}

/* Táblázat műveletek oszlopa */
.actions {
    white-space: nowrap;
    text-align: right;
}

/* Összesítő sor a táblázatban */
.summary-row {
    background-color: #f8f9fa;
    font-weight: 500;
}

.summary-row td {
    border-top: 2px solid #dee2e6;
}

/* Form control styles */
.form-control {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 1em auto;
    padding-right: 2.5em;
}

select.form-control::-ms-expand {
    display: none;
}

/* Filter form */
.filter-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .filter-group {
        flex: 100%;
    }
    
    .filter-actions {
        flex: 100%;
        justify-content: flex-start;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    width: 100%;
}

.table-responsive table {
    min-width: 100%;
    margin: 0;
}

.badge {
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}


.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.text-muted {
    color: #6c757d;
}

/* Responsive table styles */
@media (max-width: 992px) {

    .data-table th, 
    .data-table td {
        min-width: 120px;
    }
    
    .data-table th:first-child, 
    .data-table td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }
}

.data-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin: 0;
}

.data-list dt {
    font-weight: bold;
    color: #495057;
}

.data-list dd {
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 10px;
}

.stat-card h3 {
    margin: 10px 0;
    color: #495057;
    font-size: 1.1em;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #28a745;
    margin: 0;
}

.stats-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-section h2 i {
    color: #007bff;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stats-overview {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5em;
    color: white;
}

.stat-info {
    flex-grow: 1;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
}

.stat-info p {
    margin: 5px 0 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #212529;
}

/* Stat icon colors */
.stat-icon.blue {
    background-color: #007bff;
}

.stat-icon.green {
    background-color: #28a745;
}

.stat-icon.orange {
    background-color: #fd7e14;
}

.stat-icon.purple {
    background-color: #6f42c1;
}

.stat-icon.red {
    background-color: #dc3545;
}

.stat-icon.teal {
    background-color: #20c997;
}

/* Race Segments Page Styles */
.race-selector {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.race-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.race-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.race-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.race-item.active {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-dark);
}

.race-item.active .segment-count {
    color: rgba(255, 255, 255, 0.9);
}

.race-name {
    font-weight: 500;
    font-size: 1.1em;
}

.segment-count {
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    color: var(--text-muted);
}

.race-segments {
    margin-top: 30px;
}

.add-segment-form {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-inline .form-control {
    flex: 1;
    min-width: 200px;
}

.description-cell {
    position: relative;
    max-width: 150px;
}

.description-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 5px 0;
}

.description-text:hover {
    color: #007bff;
}

.description-tooltip {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    word-wrap: break-word;
    white-space: pre-wrap;
    max-height: 80vh;
    overflow-y: auto;
}

.description-text:hover+.description-tooltip,
.description-tooltip:hover {
    display: block;
}

/* Háttér overlay a tooltip mögé */
.description-tooltip::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

@media (max-width: 768px) {
    .description-tooltip {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-cancel {
    margin-right: 10px;
}

/* Form Styles im Modal */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.modal .form-group span {
    display: block;
    padding: 0.375rem 0;
    color: #666;
}

.modal .form-control {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modal .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.modal .button-group {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Z-index javítása */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Loading overlay styles */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Verseny kezdési időpont űrlap stílusok */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, .125);
}

/* Form elemek finomítása */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Reszponzív igazítások */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .row.g-3 {
        margin: 0;
    }
}

/* Races section styles */
.races-section {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.races-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.races-table th,
.races-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.races-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.status-draft {
    background-color: #fef3c7;
    color: #92400e;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-completed {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.actions {
    white-space: nowrap;
    text-align: right;
}

/* Race segments runner form styles */
.runner-form select {
    margin-right: 0.5rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Form select styles */
.form-select {
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-select-sm {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Loading spinner styles */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.text-primary {
    color: #0d6efd;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

/* Button group styles */
.button-group {
    display: flex;
    gap: 10px;
}

/* Admin specific button groups */
.admin-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Einheitliche Button-Gruppen in Tabellen */
.actions .button-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
}

.actions .button-group .btn {
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.actions .button-group .btn i {
    margin-right: 6px;
    font-size: 13px;
}

/* Status badges für alle Tabellen */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.status-draft {
    background-color: #fef3c7;
    color: #92400e;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-completed {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {

    .monthly-stats,
    .content,
    .runners-table,
    .races-table,
    .segments-table,
    .data-table,
    .stats-section {
        margin: 15px auto;
        padding: 15px;
    }

    .table-responsive {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    table {
        min-width: 100% !important;
    }

    th,
    td {
        padding: 8px;
        font-size: 13px;
    }

    .actions .button-group .btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .actions .button-group .btn i {
        margin-right: 4px;
        font-size: 12px;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 0.8em;
        min-width: 60px;
    }
}

@media (max-width: 480px) {

    .monthly-stats,
    .content,
    .runners-table,
    .races-table,
    .segments-table,
    .data-table,
    .stats-section {
        padding: 10px;
    }

    th,
    td {
        padding: 6px;
        font-size: 12px;
    }

    .actions .button-group .btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .status-badge {
        padding: 3px 6px;
        font-size: 0.75em;
        min-width: 50px;
    }
}

/* Segments-Seite Styles */
.segments-page {
    max-width: 1150px;
    margin: 0 auto;
    padding: 20px;
}

.segments-page .monthly-stats {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.segments-page .monthly-stats h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.segments-page .monthly-stats h2 i {
    color: #0d6efd;
}

.segments-page .table-responsive {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.segments-page .table {
    margin: 0;
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 800px;
    /* Minimale Breite für die Tabelle */
}

.segments-page .table th {
    background: #f8f9fa;
    padding: 12px 15px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.segments-page .table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.segments-page .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Spaltenbreiten */
.segments-page .table th:nth-child(1) {
    width: 50px;
}

/* ID */
.segments-page .table th:nth-child(2) {
    width: 150px;
}

/* Név */
.segments-page .table th:nth-child(3) {
    width: 100px;
}

/* Tempó */
.segments-page .table th:nth-child(4) {
    width: 200px;
}

/* Email */
.segments-page .table th:nth-child(5) {
    width: 120px;
}

/* Telefon */
.segments-page .table th:nth-child(6) {
    width: 80px;
}

/* Admin? */
.segments-page .table th:nth-child(7) {
    width: 120px;
}

/* Műveletek */

/* Button Styles */
.segments-page .actions {
    white-space: nowrap;
}

.segments-page .button-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.segments-page .button-group .btn {
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.segments-page .button-group .btn i {
    width: 16px;
    margin-right: 8px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .segments-page {
        padding: 15px;
    }

    .segments-page .monthly-stats {
        padding: 15px;
    }

    .segments-page .table td,
    .segments-page .table th {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .segments-page {
        padding: 10px;
    }

    .segments-page .monthly-stats {
        padding: 15px;
        margin-bottom: 15px;
    }

    .segments-page .monthly-stats h2 {
        font-size: 1.25rem;
    }

    .segments-page .table {
        font-size: 0.9rem;
    }

    .segments-page .table td.actions {
        position: sticky;
        right: 0;
        background: #fff;
        border-left: 1px solid #dee2e6;
        z-index: 1;
    }

    .segments-page .button-group .btn {
        padding: 6px 10px;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .segments-page {
        padding: 5px;
    }

    .segments-page .monthly-stats {
        padding: 10px;
    }

    .segments-page .monthly-stats h2 {
        font-size: 1.1rem;
    }

    .segments-page .table {
        font-size: 0.8rem;
    }

    .segments-page .table td,
    .segments-page .table th {
        padding: 8px;
    }

    .segments-page .button-group .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .segments-page .button-group .btn i {
        width: 12px;
        margin-right: 4px;
    }
}

/* Stat Box Styles */
.stat-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100px;
    border: 1px solid #e9ecef;
    width: 100%;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Spezielle Styles für die "SIKERÜLT!" Anzeige */
.stat-box.achievement {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-box.achievement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff" opacity="0.1"><path d="M12 2L15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2z"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.1;
}

.stat-box.achievement .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.stat-box.achievement .stat-icon i {
    color: #fff;
}

.stat-box.achievement .stat-value {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 28px;
    font-weight: bold;
}

.stat-box.achievement .stat-label {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Animation für die "SIKERÜLT!" Anzeige */
@keyframes achievementPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.stat-box.achievement {
    animation: achievementPulse 2s infinite;
}

/* Tabellenzeilen für den eingeloggten Benutzer */
tr.my-segment {
    background-color: #e3f2fd !important;
    border-left: 4px solid #1976d2;
}

tr.my-segment:hover {
    background-color: #bbdefb !important;
}

tr.my-segment td {
    font-weight: 500;
}

/* Mobile Anpassungen für hervorgehobene Zeilen */
@media (max-width: 768px) {
    tr.my-segment {
        background-color: #e3f2fd !important;
        border-left: 3px solid #1976d2;
    }

    tr.my-segment:hover {
        background-color: #bbdefb !important;
    }

    tr.my-segment td {
        font-weight: 500;
        padding: 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    tr.my-segment {
        border-left: 2px solid #1976d2;
    }

    tr.my-segment td {
        padding: 6px;
        font-size: 12px;
    }
}

/* Race Preview Styles */
.segment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.segment-bubble {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.segment-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -25px;
    width: 2px;
    height: 25px;
    background: linear-gradient(to bottom, #1a237e, #0d47a1);
    transform: translateX(-50%);
    opacity: 0.8;
}

.segment-bubble:last-child::after {
    display: none;
}

.segment-content {
    position: relative;
    min-height: 120px;
}

.start-point {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.end-point {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.location {
    font-size: 1.1em;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.time {
    font-size: 0.9em;
    padding: 5px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.runner-section {
    position: relative;
        text-align: center;
    margin: 20px 0;
}

.path-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 40px;
    transform: translateY(-50%);
    z-index: 1;
}

.path-line svg {
    width: 100%;
    height: 100%;
}

.path-line path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
    stroke-linecap: round;
}

.location-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.location-link:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    opacity: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.runner-info {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.runner-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.runner-info.active {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.runner-info.active .runner-icon {
    animation: runningMotionFast 0.5s infinite;
}

.runner-icon {
    font-size: 24px;
    margin-right: 10px;
    animation: runningMotion 1s infinite;
    transform-origin: bottom center;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes runningMotion {
    0% {
        transform: rotate(-5deg);
        opacity: 0.95;
    }

    50% {
        transform: rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: rotate(-5deg);
        opacity: 0.95;
    }
}

.runner-name {
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.maps-link {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.maps-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.segment-bubble.my-segment {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 25px rgba(25, 118, 210, 0.4);
    transform: scale(1.03);
    transition: all 0.3s ease;
    position: relative;
}

.segment-bubble.my-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
    border-radius: 25px;
    pointer-events: none;
}

.segment-bubble.my-segment:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(25, 118, 210, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
}

.segment-bubble.my-segment::after {
    background: linear-gradient(to bottom, #1976d2, #1565c0);
    opacity: 1;
    width: 3px;
}

.segment-bubble.my-segment .runner-info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
    transform: scale(1.05);
}

.segment-bubble.my-segment .runner-info:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
    border-color: rgba(255, 255, 255, 0.7);
}

.segment-bubble.my-segment .runner-icon {
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    font-size: 28px;
}

.segment-bubble.my-segment .runner-name {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    font-size: 1.3em;
    letter-spacing: 0.5px;
}

.segment-bubble.my-segment .location-link,
.segment-bubble.my-segment .maps-link {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.segment-bubble.my-segment .location-link:hover,
.segment-bubble.my-segment .maps-link:hover {
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.segment-bubble.my-segment .time {
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    padding: 6px 15px;
}

.segment-bubble.my-segment .path-line path {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes runningMotionFast {
    0% {
        transform: rotate(-8deg);
        opacity: 0.95;
    }

    50% {
        transform: rotate(8deg);
        opacity: 1;
    }

    100% {
        transform: rotate(-8deg);
        opacity: 0.95;
    }
}

.segment-bubble.my-segment {
    animation: runningMotionFast 0.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 25px rgba(25, 118, 210, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(25, 118, 210, 0.6);
    }

    100% {
        box-shadow: 0 4px 25px rgba(25, 118, 210, 0.4);
    }
}

.segment-bubble.my-segment {
    animation: pulse 2s infinite;
}

.runner-distance {
    font-weight: 600;
}

/* Welcome Section Style */
.welcome-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 10px 0;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .welcome-section {
        justify-content: center;
        padding: 0 10px;
    }
}

/* Welcome Message Style */
.welcome-message {
    font-size: 1.2em;
    color: var(--text-color);
    margin: 10px 0;
    padding: 10px 15px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.welcome-message::before {
    content: '👋';
    font-size: 1.3em;
}

@media (max-width: 768px) {
    .welcome-message {
        font-size: 1.1em;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .welcome-message {
        font-size: 1em;
        padding: 6px 10px;
    }
}

/* CSS animáció a villogáshoz */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

.blink {
    animation: blink 2s 3;
    /* 1 másodpercig villog, folyamatosan */
}

.maps-link-container {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 5px;
    border-radius: 50%;
}

.maps-link {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.maps-link:hover {
    color: white;
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.location-share-link-container {
    position: absolute;
    left: 95%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 5px;
    border-radius: 50%;
}

.location-share-link {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.location-share-link:hover {
    color: white;
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}


/* Location share link stílusa */
/* .location-share-link {
    margin-left: 10px;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.location-share-link:hover {
    opacity: 1;
    transform: scale(1.1);
} */


/* Start, Váltás és Célba értünk gombok */
.start-button-container,
.handover-button-container,
.finish-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.start-button-container::before,
.handover-button-container::before,
.finish-button-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: linear-gradient(to top, #1a237e, #0d47a1);
}

.start-button-container::after,
.handover-button-container::after,
.finish-button-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: linear-gradient(to bottom, #1a237e, #0d47a1);
}

.start-button-container .btn,
.handover-button-container .btn,
.finish-button-container .btn {
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.start-button-container .btn:hover,
.handover-button-container .btn:hover,
.finish-button-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.start-button-container .btn i,
.handover-button-container .btn i,
.finish-button-container .btn i {
    margin-right: 10px;
}

/* Aktív szegmens stílusa */
.segment-bubble.active-segment {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(46, 204, 113, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.4);
    animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
    0% {
        box-shadow: 0 8px 30px rgba(46, 204, 113, 0.4);
    }

    50% {
        box-shadow: 0 8px 40px rgba(46, 204, 113, 0.6);
    }

    100% {
        box-shadow: 0 8px 30px rgba(46, 204, 113, 0.4);
    }
}

.segment-bubble.active-segment .runner-info {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4);
}

.segment-bubble.active-segment .runner-icon {
    animation: runningMotionFast 0.5s infinite;
}

.segment-bubble.active-segment .path-line path {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Idő különbség stílusa */
.time-diff {
    font-size: 0.8em;
    margin-top: 2px;
    font-weight: 500;
    background-color: rgba(245, 245, 245, 0.7);
    padding: 2px 6px;
    /* belső térköz a szöveg körül */
    border-radius: 8px;
    /* lekerekített sarkok (opcionális) */
}

.time-diff.text-success {
    color: #2ecc71;
}

.time-diff.text-danger {
    color: #e74c3c;
}

/* Idő különbség stílusa futonal*/
.time-diff-runner {
    font-size: 0.6em;
    margin-top: 2px;
    font-weight: 500;
    background-color: rgba(245, 245, 245, 0.7);
    padding: 2px 6px;
    /* belső térköz a szöveg körül */
    border-radius: 8px;
    /* lekerekített sarkok (opcionális) */
}

.time-diff-runner.text-success {
    color: #2ecc71;
}

.time-diff-runner.text-danger {
    color: #e74c3c;
}

/* Közelgő versenyek stílusa */

@keyframes pulse-icon {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse {
    animation: pulse-icon 1.5s infinite;
}


/* Menü aktív stílusa */
.dropdown-item.active {
    border-left: 4px solid #0d6efd;
    background-color: #e9f5ff;
    font-weight: bold;
    color: #0d6efd;
}

.dropdown-item.active i {
    color: #0d6efd;
}

/* Gombok szebben elférnek kis helyen */
td.actions .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

/* A "Műveletek" oszlop szűkítése */
td.actions {
    white-space: nowrap;
    width: 140px;
    /* állíthatod kisebbre vagy nagyobbra is */
}

.table {
    table-layout: fixed;
    word-wrap: break-word;
}

table th {
    white-space: normal !important;
    word-wrap: break-word;
}

/* Segment Hervorhebung Styles */
.segment-highlight {
    background-color: rgba(52, 152, 219, 0.1) !important;
    border-left: 4px solid #3498db !important;
}

/* Für die Tabelle */
.table tr.segment-highlight td:first-child {
    border-left: 4px solid #3498db;
}

/* Für die Karten */
.card.segment-highlight {
    border-color: #3498db;
}

/* Hover-Effekt */
.segment-highlight:hover {
    background-color: rgba(52, 152, 219, 0.15) !important;
}

/* Icon für eigene Segmente */
.segment-owner-icon {
    color: #3498db;
    margin-left: 0.5rem;
}

.detail-box {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    height: 100%;
}

.detail-box i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-content small {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.detail-content strong {
    font-size: 1rem;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

.card-title i {
    margin-right: 0.5rem;
}

/* Dropdown-Submenu Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
    z-index: 1000;
}

.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu .dropdown-menu.show {
    display: block;
}

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover > a:after {
    border-left-color: #fff;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
    left: -100%;
    margin-left: 0;
}

/* Mobile Dropdown Submenu */
@media (max-width: 767px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
        border-left: 3px solid #007bff;
    }
    
    .dropdown-submenu > a:after {
        display: none;
    }
    
    .dropdown-submenu .dropdown-item {
        padding-left: 20px;
    }
}

.segment-hidden {
    display: none !important;
}

.segment-bubble[data-finished="1"] {
    opacity: 0.5;
    background-color: #f0f0f0;
    border-left: 5px solid #bbb;
}

.tooltip-inner {
    background-color: #343a40; /* sötétszürke háttér */
    color: #f8f9fa; /* világos szöveg */
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 0.3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #343a40;
}
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #343a40;
}
.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #343a40;
}
.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #343a40;
}

.modal-content.bg-dark {
    background-color: #2c3e50;
    color: #ecf0f1;
}

@media (max-width: 576px) {
    #confirmModal .modal-footer .btn {
        font-size: 1.1rem;
        padding: 12px 16px;
        width: 100%;
    }

    #confirmModal .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    #confirmModal .modal-content {
        border-radius: 1rem;
    }
}

.fab-menu {
    position: fixed;
    bottom: 20px;
    right: 3px;
    z-index: 1100;
  }
  
  .fab-main-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 22px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  
  .fab-sub-buttons {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
  }
  
  .fab-sub-btn-call {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-sub-btn-call:hover {
    background-color: #c0392b;
  }

  .fab-sub-btn-active {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-sub-btn-active:hover {
    background-color: #219a52;
  }

  .fab-sub-btn-top {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-sub-btn-top:hover {
    background-color: #2980b9;
  }

  .fab-sub-btn-map {
    background-color: #00BCD4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-sub-btn-map:hover {
    background-color: #009688;
  }

  .fab-menu.open .fab-sub-buttons {
    display: flex;
    animation: fadeInUp 0.3s ease;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes pulse-zoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.fab-main-btn.animate {
    animation: pulse-zoom 0.8s ease-in-out;
    animation-iteration-count: 3;
}

.map {
    height: 100vh;
    width: 100%;
}






