/* Faustball - Main Layout (scoped under .FaustballApp) */

.FaustballApp {
    --fb-primary: #2563eb;
    --fb-secondary: #64748b;
    --fb-success: #10b981;
    --fb-danger: #ef4444;
    --fb-warning: #f59e0b;
    --fb-info: #3b82f6;
    --fb-light-bg: #f8fafc;
    --fb-dark-bg: #1e293b;
    --fb-border: #e2e8f0;
    --fb-text: #333;
    --fb-text-light: #64748b;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--fb-light-bg);
    color: var(--fb-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.FaustballHeader {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.FaustballHeaderContent {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.FaustballHeaderLogo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fb-primary);
    text-decoration: none;
}

.FaustballHeaderLogo:hover {
    color: #1d4ed8;
}

.FaustballHeaderLogoIcon {
    font-size: 1.6rem;
}

/* Navigation */
.FaustballNav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.FaustballNavLink {
    padding: 0.5rem 0.75rem;
    color: var(--fb-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.FaustballNavLink:hover {
    background: var(--fb-light-bg);
    color: var(--fb-primary);
}

.FaustballNavLinkActive {
    color: var(--fb-primary);
    background: rgba(37, 99, 235, 0.08);
}

.FaustballNavLinkLive {
    color: var(--fb-danger);
}

.FaustballLiveDot {
    display: inline-block;
    animation: fbPulse 1.5s ease-in-out infinite;
    font-size: 0.7rem;
    vertical-align: middle;
    margin-right: 2px;
}

@keyframes fbPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Header Actions */
.FaustballHeaderActions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.FaustballButtonSecondary {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: var(--fb-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.FaustballButtonSecondary:hover {
    background: #1d4ed8;
}

/* Mobile Menu */
.FaustballHiddenMobile {
    display: flex;
}

.FaustballHiddenDesktop {
    display: none;
}

.FaustballHeaderMenuBtn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.FaustballMenuIcon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.FaustballMenuIcon span {
    display: block;
    height: 2px;
    background: var(--fb-text);
    border-radius: 2px;
    transition: all 0.3s;
}

.FaustballMenuIconOpen span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.FaustballMenuIconOpen span:nth-child(2) {
    opacity: 0;
}

.FaustballMenuIconOpen span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.FaustballMobileNavOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    animation: fbFadeIn 0.2s ease;
}

@keyframes fbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.FaustballMobileNav {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: white;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    animation: fbSlideIn 0.2s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

@keyframes fbSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.FaustballMobileNavLink {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--fb-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.FaustballMobileNavLink:hover {
    background: var(--fb-light-bg);
    color: var(--fb-primary);
}

.FaustballMobileNavLinkLive {
    color: var(--fb-danger);
}

.FaustballDivider {
    height: 1px;
    background: var(--fb-border);
    margin: 0.5rem 1rem;
}

/* Main Content */
.FaustballMain {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1rem;
}

/* Footer */
.FaustballFooter {
    background: var(--fb-dark-bg);
    color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem 1rem;
    margin-top: auto;
}

.FaustballFooterContent {
    max-width: 1200px;
    margin: 0 auto;
}

.FaustballFooterGrid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.FaustballFooterTitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.FaustballFooterText {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.FaustballFooterLink {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.2rem 0;
    transition: color 0.2s;
}

.FaustballFooterLink:hover {
    color: white;
}

.FaustballFooterBottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Scoped common styles within FaustballApp */
.FaustballApp .hero-section {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--fb-primary), var(--fb-secondary));
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.FaustballApp .hero-section h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.FaustballApp .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

.FaustballApp .content-section {
    margin: 2rem 0;
}

.FaustballApp .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.FaustballApp .card-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.FaustballApp .card-container h2 {
    margin-bottom: 1rem;
    color: var(--fb-dark-bg);
}

.FaustballApp .tournament-list,
.FaustballApp .match-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.FaustballApp .tournament-card,
.FaustballApp .match-card {
    display: block;
    padding: 1rem;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--fb-text);
    transition: all 0.3s;
}

.FaustballApp .tournament-card:hover,
.FaustballApp .match-card:hover {
    border-color: var(--fb-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.FaustballApp .tournament-card h3 {
    margin: 0 0 0.25rem 0;
    color: var(--fb-primary);
}

.FaustballApp .tournament-card p {
    margin: 0.25rem 0;
    color: var(--fb-text-light);
    font-size: 0.9rem;
}

.FaustballApp .tournament-card .date {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #999;
}

.FaustballApp .match-card.live {
    border-color: var(--fb-danger);
    background: rgba(239, 68, 68, 0.05);
}

.FaustballApp .match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.FaustballApp .team {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

.FaustballApp .vs {
    color: var(--fb-secondary);
    font-size: 0.9rem;
}

/* Badge Styles */
.FaustballApp .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.FaustballApp .badge-live {
    background: var(--fb-danger);
    color: white;
}

.FaustballApp .badge-primary {
    background: var(--fb-primary);
    color: white;
}

.FaustballApp .badge-success {
    background: var(--fb-success);
    color: white;
}

.FaustballApp .badge-secondary {
    background: var(--fb-secondary);
    color: white;
}

/* Table Styles */
.FaustballApp table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.FaustballApp th {
    background: var(--fb-light-bg);
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--fb-border);
    font-weight: bold;
}

.FaustballApp td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--fb-border);
}

.FaustballApp tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Button Styles */
.FaustballApp .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

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

.FaustballApp .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.FaustballApp .btn-secondary {
    background: var(--fb-secondary);
    color: white;
}

.FaustballApp .btn-danger {
    background: var(--fb-danger);
    color: white;
}

.FaustballApp .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .FaustballHiddenMobile {
        display: none;
    }

    .FaustballHiddenDesktop {
        display: flex;
    }

    .FaustballHeaderMenuBtn {
        display: block;
    }

    .FaustballMain {
        padding: 1rem 0.75rem;
    }

    .FaustballApp .grid-2 {
        grid-template-columns: 1fr;
    }

    .FaustballApp .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .FaustballApp .hero-section h1 {
        font-size: 2rem;
    }

    .FaustballApp .subtitle {
        font-size: 1rem;
    }

    .FaustballApp .card-container {
        padding: 1rem;
    }

    .FaustballApp .card-container h2 {
        font-size: 1.2rem;
    }

    .FaustballFooterGrid {
        grid-template-columns: 1fr;
    }

    .FaustballFooter {
        padding: 2rem 1rem;
    }

    /* Table horizontal scroll on mobile */
    .FaustballApp table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .FaustballApp .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .FaustballApp .hero-section h1 {
        font-size: 1.6rem;
    }

    .FaustballApp .hero-section {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .FaustballMain {
        padding: 0.75rem 0.5rem;
    }

    .FaustballApp .content-section {
        margin: 1rem 0;
    }

    .FaustballApp .grid-2 {
        gap: 1rem;
    }
}
