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

:root {
    --primary-blue: #1e3a8a;
    --primary-blue-dark: #1e2a5e;
    --primary-blue-light: #3b82f6;
    --accent-blue: #60a5fa;
    --white: #ffffff;
    --off-white: #f8fafc;
    --light-gray: #e2e8f0;
    --medium-gray: #94a3b8;
    --dark-gray: #475569;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --pitch-green: #16a34a;
    --pitch-green-dark: #15803d;
    --pitch-green-light: #22c55e;
    --ball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='47' fill='%231e3a8a'/%3E%3Cpolygon points='50,18 64,33 57,52 43,52 36,33' fill='%23ffffff'/%3E%3Cpath d='M50 18 L50 6 M64 33 L77 24 M57 52 L70 62 M43 52 L30 62 M36 33 L23 24 M50 74 L50 94' stroke='%23ffffff' stroke-width='3' fill='none'/%3E%3C/svg%3E");
    --ball-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='47' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='3'/%3E%3Cpolygon points='50,18 64,33 57,52 43,52 36,33' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='3'/%3E%3C/svg%3E");
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary-blue);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(30, 42, 94, 0.94) 100%),
        repeating-linear-gradient(0deg, rgba(22, 163, 74, 0.55) 0 60px, rgba(20, 140, 65, 0.55) 60px 120px);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.06) 0, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.06) 0, transparent 40%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 720px;
    height: 720px;
    transform: translate(-50%, -50%);
    background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, 0.045) 30px 31px);
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.hero-ball-left,
.hero-ball-right {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.22;
    animation: floatBall 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-ball-left {
    left: 6%;
    bottom: 14%;
    background: var(--ball-white) no-repeat center / contain;
}

.hero-ball-right {
    right: 7%;
    top: 12%;
    width: 90px;
    height: 90px;
    background: var(--ball-white) no-repeat center / contain;
    animation-delay: -4s;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero .tagline {
    display: inline-block;
    background: var(--pitch-green);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.hero-logo {
    width: 110px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), var(--shadow-lg);
    background: var(--white);
    padding: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pitch-green), var(--pitch-green-light));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-label::before {
    content: '⚽';
    margin-right: 6px;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section h2::before {
    content: '';
    width: 34px;
    height: 34px;
    background: var(--ball) no-repeat center / contain;
    flex-shrink: 0;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 46px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pitch-green), var(--pitch-green-light));
    border-radius: 2px;
}

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    overflow-x: auto;
    border-top: 4px solid var(--pitch-green);
}

#tabulka .table-container {
    max-height: 620px;
    overflow-y: auto;
}

#matches-table,
#fixtures-table,
#standings-table {
    width: 100%;
    border-collapse: collapse;
}

#matches-table th,
#matches-table td,
#fixtures-table th,
#fixtures-table td,
#standings-table th,
#standings-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

#matches-table th,
#fixtures-table th,
#standings-table th {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#matches-table tbody tr,
#fixtures-table tbody tr,
#standings-table tbody tr {
    transition: var(--transition);
}

#matches-table tbody tr:nth-child(even):not(.highlight-row),
#fixtures-table tbody tr:nth-child(even),
#standings-table tbody tr:nth-child(even):not(.highlight-row) {
    background: rgba(34, 197, 94, 0.04);
}

#matches-table tbody tr:hover,
#fixtures-table tbody tr:hover,
#standings-table tbody tr:hover {
    background: var(--off-white);
}

#matches-table tbody tr:last-child td,
#fixtures-table tbody tr:last-child td,
#standings-table tbody tr:last-child td {
    border-bottom: none;
}

#matches-table td,
#fixtures-table td,
#standings-table td {
    font-size: 0.95rem;
}

#fixtures-table th:first-child,
#fixtures-table td:first-child,
#matches-table th:first-child,
#matches-table td:first-child {
    white-space: nowrap;
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 700px;
}

.team-cell {
    font-weight: 700;
    color: var(--primary-blue);
}

.team-filter-cell {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-blue);
    transition: var(--transition);
    white-space: nowrap;
}

.team-filter-cell:hover {
    color: var(--pitch-green-dark);
    text-decoration: underline;
}

.dash-cell {
    width: 30px;
    text-align: center !important;
    color: var(--medium-gray);
}

.highlight-row {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.14), rgba(34, 197, 94, 0.1));
    border-left: 3px solid var(--pitch-green);
}

.highlight-row:hover {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.22), rgba(34, 197, 94, 0.16)) !important;
}

.highlight-row td {
    font-weight: 600;
    color: var(--pitch-green-dark);
}

.empty-row {
    text-align: center;
    color: var(--text-light);
    padding: 32px 16px;
}

.standings-header {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-dark));
    color: #fff;
    font-weight: 600;
    padding: 10px 16px;
}

.btn-delete {
    background: none;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--danger);
    cursor: pointer;
    transition: var(--transition);
}

.btn-fixtures-more {
    background: var(--off-white);
    border: 2px dashed var(--medium-gray);
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
}

.btn-fixtures-more:hover {
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-delete:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.match-score {
    display: inline-block;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: 'Courier New', monospace;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    min-width: 52px;
    text-align: center;
}

.match-score.win {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

.match-score.draw {
    color: var(--accent-blue);
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.08);
}

.match-score.loss {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

.match-competition {
    display: inline-block;
    background: var(--primary-blue-light);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--light-gray);
    color: var(--danger);
}

/* Form */
#match-form {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 700px;
    border-top: 4px solid var(--pitch-green);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--pitch-green), var(--pitch-green-dark));
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--pitch-green-dark), var(--pitch-green));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

/* About Section */
.about-content {
    display: grid;
    gap: 32px;
}

.about-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 12px;
    margin-top: 24px;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Contact Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.contact-item {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
    border-top: 3px solid var(--pitch-green);
}

.contact-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.contact-item h3::before {
    content: '⚽ ';
    color: var(--pitch-green);
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.7;
}

.contact-item a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Fotogalerie */
.gallery-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
}

.gallery-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.gallery-link:hover {
    background: var(--pitch-green);
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    margin: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    overflow: hidden;
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-item figcaption {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--text-light);
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius-lg);
    font-style: italic;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background:
        linear-gradient(135deg, rgba(30, 42, 94, 0.95), rgba(24, 32, 74, 0.95)),
        repeating-linear-gradient(0deg, rgba(22, 163, 74, 0.4) 0 60px, rgba(20, 140, 65, 0.4) 60px 120px);
    color: var(--white);
    padding: 24px 0;
    margin-top: auto;
    text-align: center;
    border-top: 4px solid var(--pitch-green);
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 16px;
    }

    nav ul {
        gap: 16px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-ball-left,
    .hero-ball-right {
        width: 70px;
        height: 70px;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .section h2::before {
        width: 26px;
        height: 26px;
    }

    .section h2::after {
        left: 38px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .filters select {
        min-width: 100%;
    }

    #matches-table th,
    #matches-table td,
    #fixtures-table th,
    #fixtures-table td,
    #standings-table th,
    #standings-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 60px 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section {
        padding: 40px 0;
    }

    #match-form {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatBall {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(12deg); }
}

.section {
    animation: fadeIn 0.5s ease forwards;
}

.hero-logo {
    animation: floatBall 6s ease-in-out infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}