/* Modern CSS für Schachverein Website */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

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

/* Header & Navigation */
.header {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nav-brand .subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chess-board-placeholder {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chess-board-placeholder svg {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Results Preview */
.latest-results {
    padding: 4rem 0;
}

.results-preview {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    min-height: 200px;
}

.results-preview .loading {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.result-item {
    padding: 1rem;
    background: white;
    margin-bottom: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
}

.result-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.result-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* News Section */
.news-preview {
    padding: 4rem 0;
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.news-date {
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.news-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: #c0392b;
}

/* Page Content */
.page-content {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.page-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Results Page */
.results-container {
    padding: 3rem 0;
}

.team-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.team-selector .team-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.team-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.team-btn:hover,
.team-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.results-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.results-table tr:hover {
    background: var(--bg-light);
}

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

/* Players Table Specific Styles */
.players-table {
    font-size: 0.95rem;
}

.players-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.players-table tbody tr:hover {
    background: rgba(26, 26, 26, 0.05);
}

.player-link,
.dwz-link,
.elo-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.player-link:hover,
.dwz-link:hover,
.elo-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.player-name {
    font-weight: 500;
    color: var(--text-color);
}

.dwz-value,
.elo-value {
    color: var(--text-color);
}

.no-value {
    color: var(--text-light);
    font-weight: normal;
}

/* Player Modal */
.player-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.player-modal-content {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.player-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.player-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.player-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.player-stats-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.player-stats-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.player-games-table {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.player-games-table th {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
}

.player-games-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
}

.result-win {
    color: #27ae60;
}

.result-draw {
    color: var(--text-light);
}

.result-loss {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .player-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .player-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .player-modal-body {
        padding: 1.5rem;
    }
    
    .player-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pairings Page */
.pairing-round {
    margin-bottom: 3rem;
}

.pairing-round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.pairing-round-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.pairing-date {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.pairing-table {
    font-size: 0.9rem;
}

.pairing-table th {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
}

.pairing-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
}

.pairing-table tr.our-game {
    background: rgba(231, 76, 60, 0.1);
    font-weight: 500;
}

.pairing-table tr.our-game:hover {
    background: rgba(231, 76, 60, 0.15);
}

.result-played {
    color: var(--primary-color);
}

.result-pending {
    color: var(--text-light);
    font-style: italic;
}

.result-free {
    color: var(--text-light);
}

@media (max-width: 768px) {
    .pairing-round-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pairing-table {
        font-size: 0.8rem;
    }
    
    .pairing-table th,
    .pairing-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

/* Blog Content Styles */
.blog-content {
    line-height: 1.8;
    color: var(--text-color);
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.blog-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.blog-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* Tools Preview Section */
.tools-preview {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-color) 100%);
}

.tools-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-preview-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: block;
    border: 2px solid transparent;
}

.tool-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, white 0%, var(--bg-light) 100%);
}

.tool-preview-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.tool-preview-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.tool-preview-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .tools-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tool-preview-card {
        padding: 1.5rem 1rem;
    }
    
    .tool-preview-icon {
        font-size: 2.5rem;
    }
}

/* Team Info Box */
.team-info-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.team-info-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.team-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.team-info-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.team-info-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-info-item span {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .features-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .team-selector {
        flex-direction: column;
    }

    .team-btn {
        width: 100%;
    }

    .results-table {
        font-size: 0.875rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}


