/**
 * LeagueTech Shared CSS
 * Components used across multiple pages
 */

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SHARED LAYOUT COMPONENTS ===== */

/* Header - Used on all pages */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-center {
    /* Center column for future use */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

.mobile-menu-toggle:hover {
    background: #f0f0f0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 20px;
}

.logo-image {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

/* Navigation Links */
.nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a1a1a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #1a1a1a;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Authentication Links */
.auth-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #333;
}

/* User Menu System */
.user-menu {
    position: relative;
}

.user-avatar-trigger {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar-trigger:hover .user-avatar {
    background: #333;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: #333;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    display: none;
    z-index: 1001;
    margin-top: 0px;
    padding-top: 8px;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.user-email {
    font-size: 12px;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content {
    padding-top: 100px;
    min-height: 100vh;
}

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

/* ===== SHARED BUTTON STYLES ===== */
.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: auto;
}

.btn-primary {
    background: #1a1a1a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #1a1a1a;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
}

/* Button size variations */
.btn-small {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 44px;
}

.btn-xs {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 40px;
    font-weight: 500;
}

/* ===== SHARED FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    color: #1a1a1a;
    transition: border-color 0.2s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

/* ===== MOBILE RESPONSIVE NAVIGATION ===== */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
        z-index: 1001;
    }
    
    .nav-container {
        padding: 0 16px;
        gap: 12px;
    }
    
    .logo {
        font-size: 18px;
        flex: 1;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }
    
    .nav-right {
        gap: 12px;
        order: 3;
    }
    
    .nav-auth {
        gap: 12px;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: none;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        font-size: 16px;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .main-content {
        padding-top: 70px;
    }
    
    .container {
        padding: 20px 16px;
    }
}

/* ===== FOOTER STYLES ===== */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3, 
.footer-section h4 {
    margin-bottom: 15px;
    color: white;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 1.4em;
}

.footer-section h4 {
    font-size: 1.1em;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 16px;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Footer mobile responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
}

/* ===== PAGE HEADER COMPONENTS ===== */
/* Used by schedule and standings pages */

.page-header {
    text-align: center;
    margin-bottom: 0;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.page-title {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 20px;
    color: #666;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 5px;
}

/* Mobile responsive for page header */
@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
        letter-spacing: -1px;
    }
}

/* ===== MODALS ===== */
/* Used by schedule and admin pages */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: #ffffff;
    padding: 24px 32px;
    margin-bottom: 0;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.modal-title {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-subtitle {
    color: #cccccc;
    font-size: 18px;
    margin-bottom: 4px;
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    padding: 20px 32px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== MODAL FORM ENHANCEMENTS ===== */
.modal input[type="text"], 
.modal input[type="email"], 
.modal input[type="tel"], 
.modal input[type="number"], 
.modal select, 
.modal textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal input[type="text"]:focus, 
.modal input[type="email"]:focus, 
.modal input[type="tel"]:focus, 
.modal input[type="number"]:focus, 
.modal select:focus, 
.modal textarea:focus {
    outline: none;
    border-color: #1a1a1a;
}

.modal input[type="text"]:hover, 
.modal input[type="email"]:hover, 
.modal input[type="tel"]:hover, 
.modal input[type="number"]:hover, 
.modal select:hover, 
.modal textarea:hover {
    border-color: #ccc;
}

.modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.modal .form-group {
    margin-bottom: 24px;
}

.modal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* Modal button overrides */
.modal .btn {
    min-height: 44px;
    padding: 12px 20px;
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MODAL RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .modal.show {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-footer {
        padding: 16px 24px;
    }
    
    .modal .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}