/*
 * Dave's Hockey Calendar - Modern UI Stylesheet
 * 
 * Design System:
 * - Modern glassmorphism header with gradient backdrop
 * - Soft shadows and smooth transitions throughout
 * - Mobile-first responsive design
 * - Enhanced touch targets for mobile users
 * - Color-coded team indicators with hover effects
 * - Gradient buttons with elevation on hover
 * - Rounded corners (12-20px) for modern card aesthetic
 */

:root {
    --primary-color: #133a6c;
    --secondary-color: #2c5aa0;
    --header-gradient-light: #f5f8fb;
    --header-gradient-dark: #4a7bc8;
    --accent-color: #ff6b35;
    --background-color: #f0f4f8;
    --card-background: #ffffff;
    --text-color: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #ed8936;
    --hover-color: #edf2f7;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f0f7 0%, #f0f4f8 50%, #e8ecf1 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header - Modern glassmorphism style */
header {
    background: linear-gradient(135deg, rgba(19, 58, 108, 0.95) 0%, rgba(74, 123, 200, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem 0 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(19, 58, 108, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-content {
    background: rgba(255, 255, 255, 0.98);
    display: inline-block;
    padding: 2rem 3rem 1.75rem 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    margin-top: -2rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.header-content:hover {
    transform: translateY(-2px);
}

.header-content h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.header-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-weight: 500;
}

.site-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(19, 58, 108, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.9);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(19, 58, 108, 0.2);
}

/* Team Management - Modern card design */
.team-management {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.team-management:hover {
    box-shadow: var(--shadow-xl);
}

.team-management h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.team-browser-mode, .manual-mode {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.team-browser-mode:last-child, .manual-mode:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.team-browser-mode h3, .manual-mode h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modern input styling */
.association-search, .domain-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-background);
    font-family: inherit;
}

.association-search:focus, .domain-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(19, 58, 108, 0.1);
    transform: translateY(-1px);
}

.association-search::placeholder, .domain-input::placeholder {
    color: var(--text-secondary);
}

/* Modern results dropdown */
.association-results {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-top: 0.75rem;
    background: var(--card-background);
    box-shadow: var(--shadow-md);
}

.association-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.association-item:hover {
    background: var(--hover-color);
    transform: translateX(4px);
}

.association-item:last-child {
    border-bottom: none;
}

.association-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.association-location {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Team results styling */
.team-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f3ff 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    max-height: 600px;
    overflow-y: auto;
    scroll-margin-top: 20px;
    box-shadow: var(--shadow-md);
}

.team-results h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: #f0f7ff;
    padding: 0.5rem 0;
    z-index: 10;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.team-option {
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.team-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.team-option-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.team-source {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.discovery-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.1rem 0.3rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: normal;
}

/* Search Tabs */
.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.search-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.search-tab:hover {
    color: var(--primary-color);
    background: #f8f9fa;
}

.search-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #f8f9fa;
}

.search-tab-content {
    display: none;
}

.search-tab-content.active {
    display: block;
}

.leagues-results, .discover-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 1rem;
    background: white;
}

.league-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.league-item:hover {
    background-color: #f8f9fa;
}

.league-item:last-child {
    border-bottom: none;
}

.league-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.league-stats {
    font-size: 0.9rem;
    color: #666;
}

.discover-summary {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--success-color);
}

.discover-summary h4 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.official-badge {
    background: var(--success-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.loading-teams {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Modern Details/Summary styling */
details {
    background: var(--hover-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

details:hover {
    background: #e8ecf0;
    border-color: var(--primary-color);
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.5rem 0;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

details summary::marker {
    color: var(--primary-color);
}

details[open] {
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
}

details[open] summary {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.team-management h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

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

.team-input, .domain-input {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.team-input:focus, .domain-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quick-add {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.quick-add p {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f2e56 0%, #1e4178 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #4a90e2 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1e4178 0%, #2c5aa0 100%);
}

.btn-small {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c5a 100%);
    color: white;
}

.btn-small:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #d64920 100%);
}

.btn-view {
    background: #718096;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
}

.btn-view.active {
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

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

/* Teams List */
.teams-list {
    margin-top: 2rem;
}

.teams-list h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.teams-container {
    display: grid;
    gap: 0.875rem;
}

.team-item {
    background: var(--card-background);
    padding: 1.25rem;
    border-radius: 16px;
    border-left: 6px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.team-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.team-color-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 16px 0 0 16px;
}

.team-info {
    flex: 1;
    padding-left: 1rem;
}

.team-info h4 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
}

.team-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.team-info h4 a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.team-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.team-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-danger:hover {
    background-color: #c82333;
}

.no-teams {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* View Controls */
.view-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.controls-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-switcher {
    display: flex;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Calendar Section - Modern design */
.calendar-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    min-height: 600px;
    border: 1px solid var(--border-color);
}

/* FullCalendar Customization - Modern look */
.fc {
    font-family: inherit;
}

.fc-toolbar-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

.fc-button {
    background: var(--primary-color) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.625rem 1.25rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.fc-button:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
}

.fc-button:active, .fc-button-active {
    background: var(--secondary-color) !important;
}

.fc-event {
    border: none !important;
    border-radius: 8px !important;
    padding: 2px 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.fc-event:hover {
    transform: scale(1.02) !important;
    box-shadow: var(--shadow-md) !important;
    filter: brightness(1.1) !important;
}

.fc-event-title {
    font-weight: 600 !important;
}

.fc-day-today {
    background: rgba(19, 58, 108, 0.05) !important;
}

.fc-daygrid-day-number, .fc-col-header-cell-cushion {
    color: var(--text-color) !important;
    font-weight: 600 !important;
}

/* List and Upcoming Views */
.games-list {
    display: grid;
    gap: 1rem;
}

.game-item {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 6px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.game-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.game-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.game-date {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.game-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.game-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-detail strong {
    color: var(--secondary-color);
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Discovery and League Badges */
.official-badge, .discovery-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.official-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.discovery-badge {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* League Items */
.league-item {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.league-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.15);
    transform: translateY(-1px);
}

.league-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.league-stats {
    font-size: 13px;
    color: #6c757d;
}

/* Discovery Summary */
.discover-summary {
    background: linear-gradient(135deg, #e3f2fd, #f8f9ff);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.discover-summary h4 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

.discover-summary p {
    margin: 5px 0;
    color: #495057;
}

/* Error Messages */
.error-container {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 2rem;
}

.error-item {
    margin-bottom: 0.5rem;
}

.error-item:last-child {
    margin-bottom: 0;
}

/* Footer */
/* Modern Footer */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-secondary);
    background: var(--card-background);
    border-top: 2px solid var(--border-color);
    margin-top: 3rem;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Loading Indicator - Modern spinner */
.loading {
    text-align: center;
    padding: 3rem;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Error Messages - Modern alert style */
.error-container {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid var(--error-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.error-message {
    color: var(--error-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    header {
        padding: 1.75rem 0 2.5rem 0;
        border-radius: 0 0 24px 24px;
    }
    
    .header-content {
        padding: 1.5rem 2rem 1.25rem 2rem;
        margin-top: -1.5rem;
    }
    
    .header-content h1 {
        font-size: 1.75rem;
    }
    
    .header-content p {
        font-size: 0.95rem;
    }
    
    .site-logo {
        max-width: 160px;
    }
    
    .team-management {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .team-management h2 {
        font-size: 1.5rem;
    }
    
    .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .team-input, .domain-input, .association-search {
        min-width: auto;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .controls-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-switcher {
        order: 1;
        flex-direction: column;
    }
    
    .action-buttons {
        order: 2;
        justify-content: center;
        flex-direction: column;
    }
    
    .team-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .team-info {
        padding-left: 0.75rem;
    }
    
    .team-info h4 {
        font-size: 1rem;
    }
    
    .team-actions {
        width: 100%;
    }
    
    .game-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-details {
        grid-template-columns: 1fr;
    }
    
    .team-results {
        max-height: 400px;
        padding: 1.25rem;
    }
    
    .association-results {
        max-height: 300px;
    }
    
    /* Make calendar controls touch-friendly */
    .calendar-section {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .fc-toolbar-chunk {
        margin-bottom: 0.5rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .fc-button {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.35rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    header {
        padding: 1.5rem 0 2rem 0;
    }
    
    .header-content {
        padding: 1.25rem 1.5rem 1rem 1.5rem;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-content p {
        font-size: 0.875rem;
    }
    
    .site-logo {
        max-width: 140px;
    }
    
    .team-management, .calendar-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .team-management h2 {
        font-size: 1.35rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .team-results {
        max-height: 300px;
        padding: 1rem;
    }
    
    .association-results {
        max-height: 250px;
    }
    
    .fc-toolbar-title {
        font-size: 1.15rem !important;
    }
    
    footer {
        padding: 2rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-content p {
        font-size: 0.9rem;
    }
    
    .team-management, .calendar-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .view-switcher {
        flex-direction: column;
    }
    
    .btn-view {
        margin-bottom: 0.5rem;
    }
    
    .team-results {
        max-height: 300px;
    }
    
    .association-results {
        max-height: 250px;
    }
    
    /* Stack calendar toolbar on very small screens */
    .fc-toolbar {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}