/* Common styles used across all pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

th {
    background: linear-gradient(135deg, #DC143C 0%, #003893 100%);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* Player Name Display */
.player-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.flag-icon {
    width: 32px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
    display: inline-block;
}

.flag-lg {
    width: 64px;
    height: 48px;
}

/* Stats Values */
.stats-value {
    font-weight: 600;
    color: #DC143C;
    font-size: 1.1rem;
}

.secondary-stat {
    font-size: 0.85rem;
    color: #666;
}

/* Links */
a {
    color: #DC143C;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h2 {
    border-bottom: 2px solid #003893;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* ===== HEADER & NAVBAR ===== */
header {
    background: linear-gradient(135deg, #DC143C 0%, #003893 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: block;
    border-radius: 4px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    width: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover::after {
    width: calc(100% - 36px);
}

.nav-link.admin-link {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link.admin-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    gap: 6px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #003893 0%, #DC143C 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: white;
    font-weight: 600;  
}

/* Messages */
.messages {
    list-style: none;
    margin-bottom: 2rem;
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

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

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

.text-center {
    text-align: center;
}

.about-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    line-height: 1.8;
    color: #333;
}

.about-container h1 {
    font-size: 2.5rem;
    color: #1e40af;
    margin-bottom: 1rem;
    border-bottom: 3px solid #DC143C;
    padding-bottom: 0.5rem;
}

.about-container h2 {
    font-size: 1.8rem;
    color: #DC143C;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.about-container p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.about-container ul {
    list-style: none;
    padding-left: 0;
}

.about-container li {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23DC143C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>') no-repeat left center;
    padding-left: 30px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.about-container a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
}

.about-container a:hover {
    text-decoration: underline;
}

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


@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {

    .container,
    .header-container,
    main {
        max-width: 1200px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 1024px) {

    .container,
    .header-container,
    main {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    main {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .header-container {
        padding: 0 1rem;
        height: 60px;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: flex;
    }

    .navbar {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #DC143C 0%, #003893 100%);
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar.active {
        max-height: 400px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 1rem 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        padding: 12px 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    main {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    th, td {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
}