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

/* CSS Custom Properties for theming */
:root,
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-surface: #1e1e2e;
    --bg-elevated: #252536;
    --bg-input: #2a2a3a;
    --bg-hover: #353545;
    --bg-header: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    --text-primary: #e0e0e0;
    --text-secondary: #c0c0c0;
    --text-muted: #888;
    --border-color: #3a3a4a;
    --accent-blue: #5dade2;
    --accent-green: #27ae60;
    --accent-orange: #f39c12;
    --accent-red: #e74c3c;
    --accent-purple: #9b59b6;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --info-bg: #1a3a5c;
    --info-border: #5dade2;
    --warning-bg: #3a3020;
    --warning-border: #f39c12;
    --success-bg: #1a3a2a;
    --success-border: #2d5a3d;
    --error-bg: #3a1a1a;
    --error-border: #5a2a2a;
}

[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-surface: #ffffff;
    --bg-elevated: #f8fafc;
    --bg-input: #ffffff;
    --bg-hover: #e2e8f0;
    --bg-header: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #cbd5e0;
    --accent-blue: #3182ce;
    --accent-green: #38a169;
    --accent-orange: #dd6b20;
    --accent-red: #e53e3e;
    --accent-purple: #805ad5;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --info-bg: #ebf8ff;
    --info-border: #3182ce;
    --warning-bg: #fffaf0;
    --warning-border: #dd6b20;
    --success-bg: #f0fff4;
    --success-border: #38a169;
    --error-bg: #fff5f5;
    --error-border: #e53e3e;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-blue);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Global focus styles for accessibility */
*:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-color);
    overflow: hidden;
}

header {
    background: var(--bg-header);
    color: var(--text-primary);
    padding: 30px;
    text-align: center;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Theme toggle icons */
[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

[data-theme="light"] .theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light {
    display: inline;
}


h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.main-content {
    padding: 30px;
}

section {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-elevated);
    border-radius: 10px;
}

h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

h3 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Player Management */
.import-section {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.import-section small {
    flex-basis: 100%;
}

.import-section .file-label,
.import-section .btn-secondary,
.import-section .btn-export-players {
    margin: 0;
}

.file-label {
    display: inline-block;
    padding: 10px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    line-height: 1.5;
    white-space: nowrap;
}

.file-label:hover {
    background: #2980b9;
}

#fileInput {
    display: none;
}

small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
}

/* Player list legend */
.player-list-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 5px;
    font-size: 0.85rem;
}

.player-list-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.player-list-legend .legend-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.player-list-legend .legend-icon.captain {
    background: #ffd700;
    color: #333;
}

.player-list-legend .legend-icon.no-keeper {
    background: var(--accent-orange);
    color: white;
}

.player-list-legend .legend-icon.rest {
    background: var(--accent-blue);
    color: white;
}

.player-list-legend .legend-icon.status {
    background: var(--accent-green);
    color: white;
}

.player-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#playerName {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text-primary);
}

#playerNumber {
    width: 70px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    background: var(--bg-input);
    color: var(--text-primary);
}

#addPlayer {
    padding: 10px 25px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#addPlayer:hover {
    background: #229954;
}

.btn-demo {
    padding: 10px 25px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-demo:hover {
    background: #e67e22;
}

.player-list {
    background: var(--bg-input);
    padding: 15px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

#playerList {
    list-style: none;
}

#playerList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: var(--bg-hover);
    border-radius: 5px;
    transition: background 0.2s;
    color: var(--text-primary);
}

#playerList li:hover {
    background: var(--bg-elevated);
}

/* Player item with preferences */
.player-item-container {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    padding-right: 10px;
}

.player-preferences {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.pref-checkbox {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    transition: all 0.2s;
}

.pref-checkbox:hover {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pref-checkbox.active {
    color: white;
}

.pref-checkbox.no-keeper {
    color: var(--text-muted);
}

.pref-checkbox.no-keeper:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.pref-checkbox.no-keeper.active {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: white;
}

.pref-checkbox.must-rest {
    color: var(--text-muted);
}

.pref-checkbox.must-rest:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pref-checkbox.must-rest.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Player status dropdown */
.player-status-select {
    padding: 4px 6px;
    border-radius: 4px;
    border: 2px solid var(--accent-green);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 36px;
}

.player-status-select:hover {
    background: var(--bg-hover);
}

.player-status-select.status-available {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.player-status-select.status-injured {
    border-color: var(--accent-red);
    background: var(--error-bg);
    color: var(--accent-red);
}

.player-status-select.status-absent {
    border-color: var(--accent-orange);
    background: var(--warning-bg);
    color: var(--accent-orange);
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.3s;
}

.remove-btn:hover {
    background: #c0392b;
}

.btn-export-players {
    padding: 10px 25px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
    transition: background 0.3s;
}

.btn-export-players:hover {
    background: #229954;
}

/* Captain selection styles */
.player-item {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
}

.captain-checkbox {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #ffd700;
}

.player-number-edit {
    width: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-primary);
}

.player-number-edit:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--bg-hover);
}

.player-name-display {
    flex: 1;
    font-weight: 500;
}

/* Style for captain items */
#playerList li:has(.captain-checkbox:checked) {
    background: linear-gradient(135deg, #4a4a2a 0%, #3a3a25 100%);
    border-left: 4px solid #ffd700;
}

.captain-checkbox:checked + .player-name-display::before {
    content: '⭐ ';
    font-size: 1.1em;
}

/* Hover effect for captain items */
#playerList li:has(.captain-checkbox:checked):hover {
    background: linear-gradient(135deg, #5a5a35 0%, #4a4a30 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #3a3a4a;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #5dade2;
    background: rgba(93, 173, 226, 0.1);
}

.tab-button.active {
    color: #5dade2;
    border-bottom-color: #5dade2;
    background: rgba(93, 173, 226, 0.15);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-pane.active {
    display: block;
}

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

/* Player Evaluation Form Section */
.section-description {
    color: #c0c0c0;
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding: 12px;
    background: #1a3a5c;
    border-left: 4px solid #5dade2;
    border-radius: 4px;
}

.evaluation-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-weight: 600;
    color: #c0c0c0;
    font-size: 14px;
}

.input-group input,
.input-group select {
    padding: 10px;
    border: 2px solid #3a3a4a;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #5dade2;
}

.helper-text {
    color: #888;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

.evaluation-list {
    margin: 25px 0;
}

.rating-scale {
    padding: 12px;
    background: #3a3020;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #d4a574;
}

.evaluation-players {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background: #1e1e2e;
    border-radius: 5px;
}

.evaluation-player-item {
    display: grid;
    grid-template-columns: 2fr 1fr 3fr;
    gap: 10px;
    align-items: start;
    padding: 15px;
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.evaluation-player-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.eval-player-name {
    font-weight: 600;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eval-player-number {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.eval-rating-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.eval-rating-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c0c0c0;
}

.eval-rating-group select {
    padding: 8px;
    border: 2px solid #3a3a4a;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

.eval-rating-group select:focus {
    outline: none;
    border-color: #5dade2;
}

.eval-comment-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.eval-comment-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c0c0c0;
}

.eval-comment-group textarea {
    padding: 8px;
    border: 2px solid #3a3a4a;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

.eval-comment-group textarea:focus {
    outline: none;
    border-color: #5dade2;
}

.evaluation-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
}

/* Season Tracker Tab */
.season-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: 8px;
    justify-content: center;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 30px;
}

.summary-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.summary-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.season-section {
    margin-bottom: 30px;
}

.season-section h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Lineup Recommendations */
.recommendations-container {
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 20px;
}

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

.rec-section {
    background: var(--bg-main);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--accent-color);
}

.rec-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.rec-section .rec-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

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

.rec-section ul li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.rec-section ul li:last-child {
    border-bottom: none;
}

.rec-section ul li strong {
    color: var(--text-primary);
}

.rec-note {
    margin-top: 15px;
    padding: 10px 15px;
    background: var(--bg-main);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.game-history-list {
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
}

.game-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

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

.game-history-item:hover {
    background: var(--bg-hover);
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.game-name {
    font-weight: 600;
    color: var(--text-primary);
}

.game-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.game-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.game-actions {
    display: flex;
    gap: 10px;
}

.game-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-view-game {
    background: var(--accent-blue);
    color: white;
}

.btn-view-game:hover {
    background: #4a9fd4;
}

.btn-delete-game {
    background: var(--accent-red);
    color: white;
}

.btn-delete-game:hover {
    background: #c0392b;
}

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

.btn-notes-game:hover {
    background: #2980b9;
}

.game-notes {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    padding-left: 2px;
}

.player-stats-container {
    overflow-x: auto;
}

.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
}

.player-stats-table th,
.player-stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.player-stats-table th {
    background: var(--bg-elevated);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.player-stats-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.player-stats-table th.sortable:hover {
    background: var(--bg-hover);
}

.player-stats-table th.sortable::after {
    content: ' \2195';
    opacity: 0.5;
}

.player-stats-table th.sorted-asc::after {
    content: ' \2191';
    opacity: 1;
}

.player-stats-table th.sorted-desc::after {
    content: ' \2193';
    opacity: 1;
}

.player-stats-table tbody tr:hover {
    background: var(--bg-hover);
}

.player-stats-table td {
    color: var(--text-secondary);
}

.player-stats-table td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.stat-bar {
    display: inline-block;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

.season-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Settings */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.settings-header .btn-primary {
    margin: 0;
    padding: 12px 30px;
}

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

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 600;
    color: #c0c0c0;
}

.setting-item input,
.setting-item select {
    padding: 8px;
    border: 2px solid #3a3a4a;
    border-radius: 5px;
    font-size: 16px;
    background: #2a2a3a;
    color: #e0e0e0;
}

.setting-item span {
    padding: 8px;
    background: #353545;
    border-radius: 5px;
    text-align: center;
    color: #e0e0e0;
}

.formation-description {
    margin-top: 15px;
    padding: 15px;
    background: #1a3a5c;
    border-left: 4px solid #5dade2;
    border-radius: 5px;
}

.formation-description p {
    color: #85c1e9;
    font-size: 14px;
    margin: 0;
}

.age-rules {
    margin-top: 15px;
    padding: 15px;
    background: #3a3020;
    border-left: 4px solid #f39c12;
    border-radius: 5px;
}

.age-rules p {
    color: #d4a574;
    font-size: 14px;
    margin: 0;
}

/* Generate Section */
.generate-section {
    text-align: center;
    background: #252536;
}

.btn-primary, .btn-secondary {
    padding: 10px 25px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(93, 173, 226, 0.4);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #4a4a5a 0%, #3a3a4a 100%);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-secondary {
    background: #4a4a5a;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #5a5a6a;
}

/* Lineup Display */
.lineup-section {
    background: #252536;
}

.hidden {
    display: none;
}

.validation-messages {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #1a3a2a;
    border: 1px solid #2d5a3d;
}

.validation-messages.has-issues {
    background: #3a1a1a;
    border: 1px solid #5a2a2a;
}

.validation-messages p {
    margin: 5px 0;
    color: #c0c0c0;
}

.validation-messages .success {
    color: #58d68d;
    font-weight: 600;
}

.lineup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.quarter-lineup {
    background: #2a2a3a;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #3a3a4a;
    min-width: 250px;
}

.quarter-lineup h3 {
    background: #0f3460;
    color: #e0e0e0;
    padding: 10px;
    margin: -15px -15px 15px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.quarter-lineup table {
    width: 100%;
}

.quarter-lineup tr {
    border-bottom: 1px solid #3a3a4a;
}

.quarter-lineup td {
    padding: 8px;
}

.position {
    font-weight: 600;
    color: #c0c0c0;
    width: 40%;
}

.player-name {
    color: #e0e0e0;
}

.player-number {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 4px;
}

.keeper-row {
    background: #4a4a2a;
}

.sitting-row {
    background: #3a2a2a;
    font-style: italic;
}

.player-summary {
    grid-column: 1 / -1;
    background: #2a2a3a;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.player-summary-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.player-summary-header h3 {
    margin-bottom: 0;
}

.player-summary-header .action-buttons-inline {
    margin: 0;
}

.player-summary table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.player-summary thead {
    background: #0f3460;
    color: #e0e0e0;
}

.player-summary th,
.player-summary td {
    padding: 10px;
    text-align: left;
    border: 1px solid #3a3a4a;
    color: #e0e0e0;
}

.player-summary tbody tr:nth-child(even) {
    background: #353545;
}

.player-summary tbody tr:hover {
    background: #404050;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.action-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.action-buttons button span {
    font-size: 16px;
}

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

.btn-copy:hover {
    background: #2980b9;
}

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

.btn-share:hover {
    background: #229954;
}

.btn-csv {
    background: #27ae60;
    color: white;
}

.btn-csv:hover {
    background: #1e8449;
}

.btn-save-game {
    background: var(--accent-orange);
    color: white;
}

.btn-save-game:hover {
    background: #e67e22;
}

/* Loading Indicator */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 15px;
    color: white;
    font-size: 16px;
}

.loading-progress {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.action-buttons-inline {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin: 30px 0 20px 0 !important;
    text-align: center !important;
}

.action-buttons-inline button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 0 0 auto !important;
    width: auto !important;
}

.action-buttons-inline button span {
    font-size: 16px;
}

/* Dropdown styles */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: #6c757d;
    color: white;
    transition: all 0.2s;
}

.dropdown-trigger:hover {
    background: #5a6268;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s;
}

.action-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg, #2a2a3a);
    border: 1px solid var(--border-color, #3a3a4a);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 6px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

.action-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu button {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    color: var(--text-color, #e0e0e0);
    padding: 8px 12px;
    border-radius: 4px;
    margin: 2px 0;
}

.dropdown-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Override .btn-export and .btn-print padding/margin when inside action-buttons-inline */
.action-buttons-inline .btn-export,
.action-buttons-inline .btn-print {
    padding: 10px 16px;
    margin: 0;
}

.btn-export, .btn-print {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-export {
    background: #3498db;
    color: white;
}

.btn-export:hover {
    background: #2980b9;
}

.btn-print {
    background: #9b59b6;
    color: white;
}

.btn-print:hover {
    background: #8e44ad;
}

/* Drag and Drop for Lineup */
.draggable-row {
    cursor: grab;
    transition: all 0.2s ease;
}

.draggable-row:hover {
    background: rgba(52, 152, 219, 0.1);
}

.draggable-row.dragging {
    opacity: 0.5;
    cursor: grabbing;
    background: rgba(52, 152, 219, 0.2);
}

.draggable-row.drag-over {
    background: rgba(46, 204, 113, 0.3);
    outline: 2px dashed #2ecc71;
    outline-offset: -2px;
}

.draggable-row td {
    padding: 6px 8px;
}

/* Soccer Field Visualization */
.field-container {
    margin: 15px 0;
    background: #1e1e2e;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #3a3a4a;
}

.soccer-field {
    width: 100%;
    height: auto;
    max-width: 250px;
    margin: 0 auto;
    display: block;
}

.player-marker {
    cursor: pointer;
    transition: transform 0.2s;
}

.player-marker:hover {
    transform: scale(1.1);
}

.field-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #333;
}

.legend-color.keeper {
    background: #ffcc00;
}

.legend-color.defensive {
    background: #3498db;
}

.legend-color.offensive {
    background: #e74c3c;
}

/* Footer */
footer {
    background: #0f3460;
    color: #c0c0c0;
    padding: 20px;
    text-align: center;
}

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

footer a {
    color: #5dade2;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: white;
}

.notification-warning {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: white;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-primary:disabled {
    animation: pulse 1.5s ease-in-out infinite;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Smooth Transitions */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.98);
}

/* Keyboard Shortcut Hints */
.kbd-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 10px 15px;
    background: rgba(30, 30, 46, 0.95);
    color: #e0e0e0;
    border-radius: 5px;
    font-size: 0.85rem;
    z-index: 100;
    display: none;
    border: 1px solid #3a3a4a;
}

.kbd-hint.show {
    display: block;
}

.kbd-hint kbd {
    background: rgba(93, 173, 226, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    margin: 0 2px;
    font-family: monospace;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
        overflow: hidden !important;
    }
    
    html, body {
        overflow: hidden !important;
        height: auto !important;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
        overflow: hidden !important;
    }
    
    .player-section,
    .settings-section,
    .generate-section,
    .action-buttons,
    .action-buttons-inline,
    .btn-export,
    .btn-print,
    #generateLineup,
    #exportLineup,
    #printLineup,
    header,
    footer {
        display: none !important;
    }
    
    .lineup-section {
        background: white;
        padding: 10px;
        overflow: hidden !important;
    }
    
    /* Hide the Game Lineup header and validation messages */
    .lineup-section h2,
    .validation-messages {
        display: none !important;
    }
    
    /* Hide soccer field visualizations when printing */
    .field-container,
    .soccer-field,
    .field-legend {
        display: none !important;
    }
    
    /* Ensure all quarters fit on one page */
    .lineup-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        page-break-inside: avoid;
        margin-bottom: 10px;
        overflow: hidden !important;
    }
    
    .quarter-lineup {
        page-break-inside: avoid;
        padding: 10px;
        font-size: 0.9em;
        overflow: hidden !important;
    }
    
    .quarter-lineup h3 {
        margin: -10px -10px 10px;
        padding: 8px;
        font-size: 1em;
    }
    
    .quarter-lineup td {
        padding: 5px;
        font-size: 0.85em;
    }
    
    /* Keep the entire game lineup section on one page */
    #lineupResult {
        page-break-inside: avoid;
    }
    
    /* Reduce spacing for print */
    section {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    h2 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    /* Hide all scrollbars when printing */
    * {
        overflow: visible !important;
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
    
    *::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Captain indicators in print */
    .captain-star {
        color: #ffd700;
        font-weight: bold;
    }
    
    /* Ensure captain summary shows in print */
    .player-summary {
        page-break-before: always;
        padding-top: 20px;
    }

    .player-summary-header .action-buttons-inline {
        display: none !important;
    }

    .player-summary table {
        font-size: 0.8em;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .lineup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .lineup-grid {
        grid-template-columns: 1fr;
    }
    
    .player-input {
        flex-direction: column;
        gap: 10px;
    }
    
    #playerName {
        width: 100%;
    }
    
    #playerNumber {
        width: 100%;
    }
    
    #addPlayer, .btn-demo {
        width: 100%;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .settings-header .btn-primary {
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons button {
        width: 100%;
    }

    .action-buttons-inline {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .action-buttons-inline button {
        width: auto !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .dropdown-trigger {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .dropdown-menu {
        min-width: 120px;
    }
    
    /* Notification adjustments for mobile */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* Field visualization for mobile */
    .field-container {
        max-width: 100%;
    }
    
    /* Quarter lineup tables */
    .quarter-lineup {
        min-width: auto;
    }
    
    .quarter-lineup td {
        font-size: 0.9em;
    }
    
    /* Player summary table */
    .player-summary {
        overflow-x: auto;
    }

    .player-summary-header {
        flex-direction: column;
        gap: 15px;
    }

    .player-summary table {
        font-size: 0.75em;
    }

    /* Recommendations grid on mobile */
    .recommendations-grid {
        grid-template-columns: 1fr;
    }

    .rec-section {
        padding: 12px;
    }

    /* Game history on mobile */
    .game-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .game-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .game-actions button {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Player stats table on mobile */
    .player-stats-table {
        font-size: 0.85rem;
    }

    .player-stats-table th,
    .player-stats-table td {
        padding: 8px 10px;
    }

    /* Season summary on mobile */
    .season-summary {
        flex-direction: column;
        gap: 10px;
    }

    .summary-stat {
        width: 100%;
        text-align: center;
    }

    /* Season actions on mobile */
    .season-actions {
        flex-direction: column;
        gap: 10px;
    }

    .season-actions button {
        width: 100%;
    }

}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 10px;
    }

    section {
        padding: 12px;
    }

    .quarter-lineup h3 {
        font-size: 1rem;
    }

    footer {
        padding: 15px;
        font-size: 0.8rem;
    }

    /* Mobile header controls */
    .header-controls {
        gap: 8px;
    }

    /* Mobile player list legend */
    .player-list-legend {
        flex-direction: column;
        gap: 8px;
    }

    /* Mobile player preferences */
    .player-item-container {
        flex-wrap: wrap;
    }

    .player-preferences {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
        justify-content: flex-start;
    }

    /* Improve mobile import section */
    .import-section {
        flex-direction: column;
    }
}

/* Mobile lineup improvements - horizontal scroll option */
@media (max-width: 768px) {
    .lineup-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Alternative: horizontal scroll mode for lineup grid */
    .lineup-grid.horizontal-scroll {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .lineup-grid.horizontal-scroll .quarter-lineup {
        min-width: 280px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    /* Compact quarter lineup for mobile */
    .quarter-lineup table {
        width: 100%;
    }

    .quarter-lineup .position {
        width: 35%;
        font-size: 0.85em;
    }

    .quarter-lineup .player-name {
        font-size: 0.85em;
    }

    /* Player summary mobile improvements */
    .player-summary {
        padding: 10px;
    }

    .player-summary table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .player-summary th,
    .player-summary td {
        padding: 6px 8px;
        font-size: 0.7em;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root,
    [data-theme="dark"] {
        --border-color: #888;
        --text-muted: #aaa;
    }

    [data-theme="light"] {
        --border-color: #333;
        --text-muted: #555;
    }

    button,
    input,
    select {
        border-width: 2px !important;
    }
}

/* Captain star styling */
.captain-star {
    color: #ffd700;
    font-weight: bold;
    margin-right: 2px;
}

/* ============================================
   CLOUD SYNC STYLES
   ============================================ */

/* Sync Status Indicator */
.sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.sync-status.syncing {
    background: var(--info-bg);
    border-color: var(--info-border);
}

.sync-status.syncing .sync-icon {
    animation: spin 1s linear infinite;
}

.sync-status.synced {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.sync-status.error {
    background: var(--error-bg);
    border-color: var(--error-border);
}

.sync-status.offline {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sync-icon {
    font-size: 1rem;
}

.sync-text {
    white-space: nowrap;
}

/* Team Selector */
.team-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.team-selector select {
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    max-width: 150px;
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
}

.btn-auth {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    background: var(--accent-blue);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-auth:hover {
    background: #4a9ed0;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-elevated);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 0.85rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-signout {
    font-size: 0.9rem;
    opacity: 0.7;
}

.btn-signout:hover {
    opacity: 1;
    color: var(--accent-red);
}

/* Modal Styles */
.modal {
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-primary);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px var(--shadow-color);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 10px 25px;
    margin: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* Team List */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.team-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.team-list-item.active {
    border-color: var(--accent-blue);
    background: var(--info-bg);
}

.team-list-item:hover {
    border-color: var(--accent-blue);
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-name {
    font-weight: 500;
    font-size: 1rem;
}

.team-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Team Members */
.team-members-section {
    margin-bottom: 20px;
}

.team-members-section h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border-radius: 6px;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.member-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.member-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.member-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-remove-member {
    color: var(--accent-red);
    opacity: 0.6;
}

.btn-remove-member:hover {
    opacity: 1;
}

/* Invite Section */
.invite-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.invite-section h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.invite-controls {
    display: flex;
    gap: 10px;
}

.invite-controls select {
    flex: 1;
    padding: 8px 12px;
    margin: 10px;
    border-radius: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.invite-link-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.invite-link-container input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Invite Modal */
.invite-modal .modal-body {
    text-align: center;
}

.invite-details {
    text-align: left;
    background: var(--bg-elevated);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.invite-details p {
    margin: 8px 0;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive adjustments for cloud UI */
@media (max-width: 768px) {
    .sync-status .sync-text {
        display: none;
    }

    .user-name {
        display: none;
    }

    .team-selector select {
        max-width: 100px;
    }

    .header-controls {
        gap: 6px;
    }
}