/* Soccer Substitutes Tool - Mobile-First Responsive CSS */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #000000 0%, #8B0000 40%, #DC143C 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

header h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

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

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 100px;
}

.btn-primary {
    background: #8B4513; /* Valpo Brown */
    color: white;
}

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: #DAA520; /* Valpo Gold */
    color: white;
}

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

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    min-width: 150px;
}

.btn-acknowledge {
    width: 100%;
    margin-top: 10px;
}

/* Cards and Sections */
.game-setup, .game-preview, .active-game, .substitute-form-section, .pending-substitutes, .acknowledged-substitutes, .game-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-setup h2, .game-preview h2, .active-game h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

/* Teams Setup */
.teams-setup {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.team-setup {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.team-setup h3 {
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

/* Teams Display */
.teams-display, .teams-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.team-display, .team-preview {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.team-preview {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.vs {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

/* Style color picker as circle */
.form-group input[type="color"] {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #8B4513;
    cursor: pointer;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

.form-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.form-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.form-group input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-row {
    display: flex;
    align-items: end;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row:first-of-type {
    justify-content: center;
    margin-bottom: 30px;
}

.substitute-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B4513;
    align-self: center;
    margin-top: 10px;
}

/* Role Selection */
.role-selection {
    text-align: center;
    margin: 30px 0;
}

.role-selection h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.role-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.role-btn {
    padding: 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.role-btn h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.role-btn p {
    margin: 0;
    opacity: 0.8;
}

.role-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Substitutes List */
.substitutes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.substitute-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.substitutes-list.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 12px;
}

.substitutes-list.compact .substitute-item {
    margin-bottom: 0;
    padding: 12px;
    font-size: 13px;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
}

.substitutes-list.compact .substitute-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.substitutes-list.compact .substitute-details {
    font-size: 14px;
    justify-content: center;
    flex-wrap: nowrap;
}

.substitutes-list.compact .substitute-details .player-out,
.substitutes-list.compact .substitute-details .player-in {
    font-size: 1.4rem;
    min-width: 40px;
}

.substitutes-list.compact .substitute-time {
    font-size: 11px;
    padding: 3px 6px;
    text-align: center;
}

.substitutes-list.compact .btn {
    padding: 6px 10px;
    font-size: 12px;
    width: 100%;
}

.substitutes-list.compact .substitute-team {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 4px 8px;
}

.substitutes-list.compact .substitute-actions {
    margin-top: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .substitutes-list.compact {
        grid-template-columns: 1fr;
    }
}

.substitute-item.pending {
    border-left: 4px solid #f39c12;
}

.substitute-item.pending-graphics {
    border-left: 4px solid #e74c3c;
    background: #fff5f5;
}

.substitute-item.acknowledged {
    border-left: 4px solid #27ae60;
    background: #f0fff4;
}

.substitute-team {
    font-weight: 600;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 5px;
    min-width: 100px;
    text-align: center;
}

.substitute-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.3rem;
}

/* Make player numbers even bigger and more prominent */
.substitute-details .player-out,
.substitute-details .player-in {
    font-size: 1.8rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid currentColor;
    min-width: 50px;
    text-align: center;
}

.player-out {
    color: #e74c3c;
}

.player-in {
    color: #27ae60;
}

.arrow {
    color: #8B4513;
    font-size: 1.2rem;
}

.substitute-time {
    font-size: 0.9rem;
    color: #666;
}

.substitute-status {
    text-align: center;
}

.status-pending {
    color: #f39c12;
    font-weight: 600;
}

.status-acknowledged {
    color: #27ae60;
    font-weight: 600;
}

.substitute-info {
    flex: 1;
}

.substitute-actions {
    margin-left: auto;
}

.acknowledge-form {
    margin: 0;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
}

.no-substitutes {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Login Page Specific */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-form h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.password-hint {
    margin-top: 15px;
    color: #666;
}

/* Game Actions */
.game-actions {
    text-align: center;
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
        margin-bottom: 0;
    }
    
    .teams-setup {
        grid-template-columns: 1fr 1fr;
    }
    
    .role-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    .substitute-arrow {
        margin-top: 0;
        flex: 0 0 auto;
    }
    
    .substitute-item {
        flex-wrap: nowrap;
    }
    
    .btn-acknowledge {
        width: auto;
        margin-top: 0;
        min-width: 120px;
    }
}

@media (min-width: 1024px) {
    .substitute-form-section {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Loading and transition effects */
.substitute-item {
    animation: slideIn 0.3s ease-out;
}

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

/* Game Selection Tabs for Multiple Games */
.game-selector {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-selector h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.game-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-tab {
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
}

.game-tab:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.game-tab.active {
    background: #8B4513;
    color: white;
    border-color: #DAA520;
}

.game-status {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Team Selection Buttons - Forced Override */
.team-selection-buttons {
    display: flex !important;
    gap: 40px !important;
    margin: 40px 0 !important;
    justify-content: center !important;
    align-items: center !important;
}

.team-selection-buttons button.team-btn,
.team-selection-buttons .team-btn,
button[class="team-btn"],
.form-group .team-btn {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
    border: 4px solid #DAA520 !important;
    border-radius: 50% !important;
    width: min(25vw, 80px) !important;
    height: min(25vw, 80px) !important;
    font-weight: 700 !important;
    font-size: min(3.5vw, 14px) !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3) !important;
    padding: 0 !important;
    margin: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
}

.team-selection-buttons button.team-btn:hover,
.team-selection-buttons .team-btn:hover,
button[class="team-btn"]:hover,
.form-group .team-btn:hover {
    background: #f8f9fa !important;
    transform: translateY(-8px) scale(1.05) !important;
    box-shadow: 0 12px 30px rgba(218, 165, 32, 0.5) !important;
    border-color: #B8860B !important;
}

.team-selection-buttons button.team-btn.active,
.team-selection-buttons .team-btn.active,
button[class="team-btn"].active,
.form-group .team-btn.active {
    background: #8B4513 !important;
    color: white !important;
    border-color: #FFD700 !important;
    border-width: 10px !important;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.6) !important;
    transform: translateY(-4px) scale(1.02) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.team-selection-buttons button.team-btn.active:hover,
.team-selection-buttons .team-btn.active:hover,
button[class="team-btn"].active:hover,
.form-group .team-btn.active:hover {
    background: #654321 !important;
    transform: translateY(-10px) scale(1.08) !important;
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.8) !important;
}

/* Responsive Design */
.team-selection-buttons {
    display: flex !important;
    gap: min(5vw, 20px) !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 20px 0 !important;
}

@media (max-width: 768px) {
    .team-selection-buttons .team-btn {
        width: min(30vw, 75px) !important;
        height: min(30vw, 75px) !important;
        font-size: min(4vw, 13px) !important;
    }
}

@media (max-width: 480px) {
    .team-selection-buttons .team-btn {
        width: min(35vw, 70px) !important;
        height: min(35vw, 70px) !important;
        font-size: min(4.5vw, 12px) !important;
    }
}

/* Going Out Status Styles */
.substitute-item.going-out {
    border-left: 5px solid #e74c3c !important;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1), transparent) !important;
}

.substitute-item.going-out-highlight {
    border: 3px solid #e74c3c !important;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.05)) !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3) !important;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 15px rgba(231, 76, 60, 0.3); }
    50% { box-shadow: 0 0 25px rgba(231, 76, 60, 0.6); }
}

.status-going-out {
    background: #e74c3c !important;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.going-out-status {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
    animation: blink 1.5s infinite;
}

.btn-going-out {
    background: #f39c12 !important;
    border-color: #f39c12 !important;
    color: white !important;
    font-weight: bold;
}

.btn-going-out:hover {
    background: #e67e22 !important;
    border-color: #e67e22 !important;
    transform: scale(1.05);
}

.status-pending {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Bulk Selection Styles */
.bulk-actions {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bulk-select-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.all-actions-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.bulk-actions .btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

#selected-count {
    color: #f39c12;
    font-weight: bold;
    font-size: 14px;
}

.substitute-checkbox {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.bulk-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #f39c12;
}

.bulk-checkbox:checked {
    background: #f39c12;
    border-color: #f39c12;
}

.substitute-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.substitute-item.going-out .substitute-checkbox {
    display: none;
}

/* Waiting timer styles */
.waiting-timer {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #ffc107;
}

.timer-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #dc3545;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 50px;
    text-align: center;
}

/* Alert effects for going out section - white background for better readability */
.flashing-section {
    border: 3px solid #ff6b35;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    animation: subtleGlow 3s ease-in-out infinite alternate;
}

.flashing-header {
    color: #ff6b35 !important;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.going-out-flash {
    border: 2px solid #ff6b35;
    background: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
    animation: itemPulse 2s ease-in-out infinite alternate;
}

.flashing-text {
    color: #ff6b35;
    font-weight: 900;
    text-transform: uppercase;
}

.btn-flash {
    background: #ff6b35;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 14px;
    padding: 12px 20px;
    animation: buttonPulse 2.5s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
    0% { box-shadow: 0 0 10px rgba(255, 107, 53, 0.4); }
    100% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.7); }
}

@keyframes itemPulse {
    0% { 
        border-color: #ff6b35;
        box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
    }
    100% { 
        border-color: #ffc107;
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
    }
}

@keyframes buttonPulse {
    0% { 
        background: #ff6b35;
        box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
    }
    100% { 
        background: #ffc107;
        box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
    }
}

/* Section header styling */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    font-weight: 700;
}

/* Completed section fade effect */
.acknowledged-substitutes {
    transition: opacity 0.5s ease;
}

.acknowledged-substitutes .substitute-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.acknowledged-substitutes .substitute-item.fade-out {
    opacity: 0.6;
    transform: scale(0.95);
}

/* Waiting substitutes styling */
.waiting-graphics {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 5px solid #ffc107;
    animation: waitingGlow 3s ease-in-out infinite alternate;
}

/* Fix waiting section header text color */
.waiting-substitutes h3 {
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Status waiting text color */
.status-waiting {
    color: #333 !important;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

@keyframes waitingGlow {
    0% { box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3); }
    100% { box-shadow: 0 4px 16px rgba(255, 193, 7, 0.6); }
}

/* Collapsible header styles */
.collapsible-header {
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible-header.collapsed {
    height: 50px;
    min-height: 50px;
}

.collapsible-header.collapsed .header-content {
    padding: 8px 20px;
}

.collapsible-header.collapsed h1 {
    font-size: 16px;
    margin: 0;
    line-height: 1.2;
}

.collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 200px;
}

.collapsible-content.hidden {
    max-height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Floating compact toggle button */
.compact-toggle-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.compact-toggle-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.compact-toggle-btn:active {
    transform: scale(0.95);
}

.compact-toggle-btn.active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.compact-toggle-btn.active:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

/* Compact mode adjustments */
body.compact-mode .container {
    padding-top: 10px;
}

body.compact-mode .submit-form,
body.compact-mode .pending-substitutes,
body.compact-mode .waiting-substitutes,
body.compact-mode .going-out-substitutes,
body.compact-mode .acknowledged-substitutes {
    margin-top: 15px;
}

body.compact-mode header {
    margin-bottom: 10px;
}

/* Toggle button states - legacy cleanup */

/* Responsive adjustments for compact mode */
@media (max-width: 768px) {
    .collapsible-header.collapsed {
        height: 45px;
    }
    
    .collapsible-header.collapsed h1 {
        font-size: 14px;
    }
    
    .btn-outline {
        padding: 3px 6px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .bulk-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .bulk-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Timeline Phases for Graphics Interface */
.substitute-timing {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.timing-phase {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.timing-phase strong {
    min-width: 90px;
    color: #000000;
}

.timing-phase.missing {
    color: #e67e22;
    font-style: italic;
}

.timing-phase.missing strong {
    color: #e67e22;
}

.substitute-status-phase {
    margin-top: 10px;
    text-align: center;
}

.phase-complete {
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.phase-incomplete {
    background: #f39c12;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.substitute-item.complete {
    border-left: 4px solid #27ae60 !important;
}

.substitute-item.pending-execution {
    border-left: 4px solid #f39c12 !important;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.1), transparent) !important;
}

.acknowledged-substitutes h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Notification for TOC updates */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideInNotification 0.3s ease-out;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print styles for documentation */
@media print {
    body {
        background: white;
    }
    
    .header-actions, .game-actions {
        display: none;
    }
    
    .substitute-actions {
        display: none;
    }
}
