/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.header-info {
    margin: 10px 0;
}

.header-info p {
    color: #7f8c8d;
    margin: 5px 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.reset-btn, .btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
    margin: 0 5px;
}

.reset-btn:hover, .btn:hover {
    background: #c0392b;
}

.btn.btn-warning {
    background: #f39c12;
}

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

.btn.btn-info {
    background: #3498db;
}

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

.btn.btn-success {
    background: #27ae60;
}

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

.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:disabled:hover {
    background: #95a5a6;
}

/* Bulk Import */
.bulk-import {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.bulk-import h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#bulkImportText {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    resize: vertical;
    margin-bottom: 15px;
}

#bulkImportText:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.import-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

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

/* Fight Tracker */
.fight-tracker {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.tracker-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 200px 150px;
    background: #34495e;
    color: white;
    font-weight: bold;
    padding: 15px 0;
    border-bottom: 2px solid #2c3e50;
}

.tracker-header > div {
    padding: 0 15px;
    text-align: center;
}

.fight-rows {
    display: grid;
    gap: 0;
}

.fight-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 200px 150px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s;
}

.fight-row:hover {
    background-color: #f8f9fa;
}

.fight-row:nth-child(even) {
    background-color: #f9f9f9;
}

.fight-row:nth-child(even):hover {
    background-color: #f0f0f0;
}

.round-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    background: #ecf0f1;
    border-right: 1px solid #bdc3c7;
}

.fighter-cell {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-right: 1px solid #ecf0f1;
}

.fighter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.fighter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Loser placeholder styling */
.fighter-input.loser-placeholder {
    border: 2px solid #bdc3c7;
    box-shadow: 0 0 0 2px rgba(189, 195, 199, 0.3);
    background: #f8f9fa;
}

.fighter-input.loser-placeholder:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.winner-cell {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-right: 1px solid #ecf0f1;
}

.winner-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.winner-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.status-cell {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-text {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Special character highlighting */
.fighter-input.johnny-cage {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.fighter-input.scorpion {
    background: rgba(33, 150, 243, 0.1);
    border-color: #2196f3;
}

.fighter-input.bi-han {
    background: rgba(255, 87, 34, 0.1);
    border-color: #ff5722;
}

/* Fighter swap highlight */
.fighter-input.fighter-swapped {
    animation: swapPulse 0.5s ease-in-out;
}

@keyframes swapPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* World-based styling */
.fighter-input.earthworld {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.fighter-input.outworld {
    background-color: #ffebee;
    border: 2px solid #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.fighter-input.earthworld:focus {
    background-color: white;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
}

.fighter-input.outworld:focus {
    background-color: white;
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.3);
}

/* Fight status classes */
.fight-row.completed .status-text {
    background: #27ae60;
    color: white;
}

.fight-row.pending .status-text {
    background: #f39c12;
    color: white;
}

.fight-row.winner-fighter1 .fighter-input[data-position="fighter1"] {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

.fight-row.winner-fighter2 .fighter-input[data-position="fighter2"] {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

.fight-row.winner-fighter1 .fighter-input[data-position="fighter2"] {
    background: rgba(52, 58, 64, 0.1);
    border-color: #343a40;
    opacity: 0.7;
}

.fight-row.winner-fighter2 .fighter-input[data-position="fighter1"] {
    background: rgba(52, 58, 64, 0.1);
    border-color: #343a40;
    opacity: 0.7;
}

/* Special Rules */
.special-rules {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.special-rules h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.rules-list {
    display: grid;
    gap: 10px;
}

.rule {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.rule strong {
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracker-header,
    .fight-row {
        grid-template-columns: 60px 1fr 1fr 150px 120px;
        font-size: 0.9em;
    }
    
    .tracker-header > div,
    .fighter-cell,
    .winner-cell,
    .status-cell {
        padding: 0 10px;
    }
    
    .round-number {
        font-size: 1em;
    }
    
    .fighter-input,
    .winner-select {
        padding: 6px 8px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .tracker-header,
    .fight-row {
        grid-template-columns: 50px 1fr 1fr 120px 100px;
        font-size: 0.8em;
    }
    
    .tracker-header > div,
    .fighter-cell,
    .winner-cell,
    .status-cell {
        padding: 0 8px;
    }
    
    .fighter-input,
    .winner-select {
        padding: 5px 6px;
        font-size: 0.8em;
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

.notification.warning {
    background: #f39c12;
} 