/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Match report styles */
.match-header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.match-header::before,
.match-header::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 1;
    opacity: 0.2;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.match-header::before {
    left: 0;
    background-image: var(--home-team-logo, none);
    transform: rotate(-20deg);
}

.match-header::after {
    right: 0;
    background-image: var(--away-team-logo, none);
    transform: rotate(20deg);
}

.match-title {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
    gap: 20px;
}

.team-name {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    line-height: 1.2;
    display: block;
}

.team-name.home {
    grid-column: 1;
    text-align: right;
}

.team-name.away {
    grid-column: 3;
    text-align: left;
}

.match-score {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    background-color: #f5f5f5;
    padding: 0.2em 1em;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

.match-timer {
    position: relative;
    z-index: 2;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin: 1rem auto;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: #e8f5e9;
    width: fit-content;
    min-width: 200px;
}

.extra-time {
    font-size: 0.7em;
    color: #dc3545;
    margin-left: 0.3rem;
}

.period-indicator {
    display: block;
    text-align: center;
    color: #4caf50;
    font-size: 0.8em;
    margin-top: 5px;
}

.viewer-count {
    position: relative;
    z-index: 2;
    color: #666;
    font-size: 14px;
    text-align: center;
    margin: 10px auto;
    display: block;
    width: fit-content;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

/* Event form styles */
.event-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.event-form h3 {
    margin-bottom: 15px;
    color: #333;
}

.event-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}

.event-button {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-button:hover {
    background: #f8f9fa;
}

.event-button.active {
    background: #e9ecef;
    border-color: #adb5bd;
}

.event-button i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.event-button span {
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-form .form-group {
    margin-bottom: 0;
}

.event-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.event-form .form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.event-form button[type="submit"] {
    align-self: flex-start;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.event-form button[type="submit"]:hover {
    background: #0056b3;
}

/* Events list styles */
.events-list {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 500px;
    overflow-y: auto;
}

.event-item {
    padding: 8px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: #f8f9fa;
    line-height: 1.4;
    position: relative;
    padding-left: 80px;
}

.event-time {
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    color: #1976d2;
    margin-right: 25px;
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.extra-time-indicator {
    display: inline;
    color: #ff4444;
    font-size: 0.7em;
    margin-left: 1px;
}

.event-item[data-type="goal"] { background-color: rgba(40, 167, 69, 0.1); }
.event-item[data-type="yellow_card"] { background-color: rgba(255, 193, 7, 0.1); }
.event-item[data-type="red_card"] { background-color: rgba(220, 53, 69, 0.1); }
.event-item[data-type="substitution"] { background-color: rgba(23, 162, 184, 0.1); }
.event-item[data-type="other"] { background-color: rgba(108, 117, 125, 0.1); }
.event-item[data-type="period_start"] { background-color: rgba(40, 167, 69, 0.1); }
.event-item[data-type="period_end"] { background-color: rgba(220, 53, 69, 0.1); }

.event-item i {
    margin-right: 35px;
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.event-team {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.event-type {
    text-transform: capitalize;
    color: #666;
    margin-right: 10px;
}

.event-player {
    color: #666;
}

.event-content {
    display: inline-block;
    margin-left: 25px;
}

/* Admin panel styles */
.admin-container .match-header {
    text-align: center;
    margin: 20px 0;
}

.admin-container .match-title {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-container .team-name {
    font-size: 1.2em;
    font-weight: bold;
}

.admin-container .team-name.home {
    text-align: right;
    padding-right: 10px;
}

.admin-container .team-name.away {
    text-align: left;
    padding-left: 10px;
}

.admin-container .match-score {
    font-size: 1.5em;
    font-weight: bold;
    min-width: 80px;
    margin: 0;
    text-align: center;
}

.admin-container .match-timer {
    font-size: 1.2em;
    margin: 10px 0;
}

.admin-container .viewer-count {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
}

.admin-container .match-controls {
    margin-top: 15px;
}

.admin-container .period-indicator {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.admin-container .extra-time {
    color: #ff4444;
    margin-left: 5px;
}

.admin-container .match-finished,
.admin-container .match-half-break,
.admin-container .match-upcoming {
    color: #666;
}

/* Login form styles */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1976d2;
}

.form-error {
    color: #d32f2f;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
}

/* No match message */
.no-match {
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-match h2 {
    color: #1976d2;
    margin-bottom: 10px;
}

.no-match p {
    color: #666;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .match-title {
        font-size: 20px;
        gap: 15px;
    }
    
    .team-name {
        font-size: 0.9em;
    }
    
    .match-score {
        font-size: 1.3em;
        min-width: 70px;
        padding: 0.2em 0.8em;
    }
    
    .match-timer {
        min-width: 180px;
        font-size: 1.3em;
    }
    
    .event-form, .events-list {
        padding: 15px;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    .event-buttons {
        gap: 5px;
    }
    
    .event-button {
        min-width: 60px;
        padding: 8px 5px;
    }
    
    .event-button i {
        font-size: 1.2rem;
    }
    
    .event-button span {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .event-buttons {
        gap: 3px;
    }
    
    .event-button {
        min-width: 50px;
        padding: 6px 3px;
    }
    
    .event-button i {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    .event-button span {
        font-size: 0.6rem;
    }
    
    .match-title {
        font-size: 16px;
        gap: 10px;
    }
    
    .team-name {
        font-size: 0.8em;
    }
    
    .match-score {
        font-size: 1.2em;
        min-width: 60px;
        padding: 0.2em 0.6em;
    }

    .match-timer {
        min-width: 160px;
        font-size: 1.2em;
    }
}

@media (max-width: 360px) {
    .match-title {
        font-size: 14px;
        gap: 5px;
    }

    .team-name.home {
        grid-column: 1;
    }

    .team-name.away {
        grid-column: 3;
    }

    .match-score {
        width: 70px;
        min-width: 50px;
    }
}

/* Admin link styles */
.admin-link {
    margin-top: 20px;
    text-align: center;
}

.admin-link a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1976d2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-link a:hover {
    background-color: #1565c0;
}

/* Match form styles */
.match-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.match-form h3 {
    margin-bottom: 20px;
    color: #1976d2;
}

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

/* Admin header styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.admin-header h2 {
    margin: 0;
    color: #1976d2;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

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

.btn-danger {
    background-color: #ffb3b3 !important;
    color: #721c24 !important;
    border: none !important;
}

.btn-danger:hover {
    background-color: #ff5252 !important;
}

.btn:hover {
    opacity: 0.9;
}

/* Matches list styles */
.matches-list {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.admin-table td {
    vertical-align: middle;
}

.admin-table td:last-child {
    display: flex;
    gap: 8px;
}

/* Loading and error states */
.loading,
.error {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error {
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 8px;
    margin: 20px;
    padding: 20px;
}

/* Match controls styles */
.match-controls {
    position: relative;
    z-index: 2;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.period-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.period-controls .btn {
    min-width: 120px;
}

.match-status {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.status-upcoming {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.status-live {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.status-finished {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.status-half-break {
    color: #fd7e14;
    background-color: rgba(253, 126, 20, 0.1);
}

.status-text {
    font-size: 0.7em;
    margin-top: 0.5rem;
    font-weight: normal;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.team-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.team-button {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: center;
}

.team-button:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.team-button.active {
    border-color: #007bff;
    background: #e7f1ff;
    font-weight: bold;
}

.current-time {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

/* Add a subtle hover effect */
.event-item:hover {
    background-color: #f0f2f5;
    transition: background-color 0.2s ease;
}

/* Wymuszenie stylów dla .btn-success i .btn-warning */
.btn-success {
    background-color: #b6fcd5 !important;
    color: #155724 !important;
    border: none !important;
}
.btn-success:hover {
    background-color: #7fffd4 !important;
}
.btn-warning {
    background-color: #fff9c4 !important;
    color: #856404 !important;
    border: none !important;
}
.btn-warning:hover {
    background-color: #fff176 !important;
}

/* --- Wymuszenie stylów kart meczów w panelu admina --- */
.admin-panel .match-card,
.admin-panel .match-card-row,
.admin-panel .match-card-teams,
.admin-panel .match-card-info,
.admin-panel .match-card-actions,
.admin-panel .match-card-status {
    all: unset;
}
.admin-panel .match-card {
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10) !important;
    padding: 22px 24px 18px 24px !important;
    min-width: 260px !important;
    max-width: 370px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    align-items: stretch !important;
    transition: box-shadow 0.2s !important;
    margin-bottom: 10px !important;
}
.admin-panel .match-card-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #ececec !important;
}
.admin-panel .match-card-row:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}
.admin-panel .match-card-teams {
    font-size: clamp(1.05em, 2.5vw, 1.22em) !important;
    font-weight: 700 !important;
    justify-content: center !important;
    gap: 18px !important;
    letter-spacing: 0.5px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}
.admin-panel .match-card-team.home,
.admin-panel .match-card-team.away {
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    font-size: inherit;
}
.admin-panel .match-card-vs {
    color: #888 !important;
    font-weight: 500 !important;
    margin: 0 8px !important;
    flex-shrink: 0;
    font-size: 1em;
}
.admin-panel .match-card-info {
    font-size: 1.04em !important;
    color: #444 !important;
    justify-content: center !important;
    gap: 24px !important;
    background: #f7fafd !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin: 0 -12px !important;
}
.admin-panel .match-card-date {
    font-weight: 500 !important;
    color: #222 !important;
}
.admin-panel .match-card-status {
    background: #e3eafc !important;
    border-radius: 6px !important;
    padding: 3px 14px !important;
    font-size: 1em !important;
    color: #2d3a4a !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
}
.admin-panel .match-card-actions {
    justify-content: flex-end !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    padding-top: 10px !important;
    display: flex !important;
}
.admin-panel .match-card-actions .btn {
    min-width: 90px !important;
    font-size: clamp(0.95em, 2vw, 1.08em) !important;
    padding: 10px 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(90deg, #1976d2 60%, #2196f3 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-bottom: 4px;
}
.admin-panel .match-card-actions .btn.btn-secondary {
    background: linear-gradient(90deg, #757575 60%, #bdbdbd 100%) !important;
    color: #fff !important;
}
.admin-panel .match-card-actions .btn.btn-danger {
    background: linear-gradient(90deg, #e53935 60%, #ff5252 100%) !important;
    color: #fff !important;
}
.admin-panel .match-card-actions .btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.13);
    transform: translateY(-2px) scale(1.03);
}
@media (max-width: 700px) {
  .admin-panel .match-card {
    padding: 12px 4vw 10px 4vw !important;
    min-width: unset !important;
    max-width: 100% !important;
  }
  .admin-panel .match-card-teams {
    font-size: clamp(0.95em, 4vw, 1.08em) !important;
    gap: 8px !important;
  }
  .admin-panel .match-card-team.home,
  .admin-panel .match-card-team.away {
    max-width: 48%;
  }
  .admin-panel .match-card-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding-top: 8px !important;
  }
  .admin-panel .match-card-actions .btn {
    width: 100% !important;
    min-width: unset !important;
    font-size: 1em !important;
    margin-bottom: 0 !important;
  }
}
@media (max-width: 480px) {
  .admin-panel .match-card {
    padding: 8px 2vw 8px 2vw !important;
  }
  .admin-panel .match-card-teams {
    font-size: clamp(0.85em, 5vw, 1em) !important;
  }
  .admin-panel .match-card-team.home,
  .admin-panel .match-card-team.away {
    max-width: 46%;
  }
}

.match-card-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    height: 100%;
    font-weight: 500;
    letter-spacing: 0.01em;
} 