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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

h1 {
    color: #00d4ff;
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.nav-tab {
    padding: 12px 30px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.nav-tab.active {
    background: #00d4ff;
    color: #1a1a2e;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* View Containers */
.view-container {
    display: none;
}

.view-container.active-view {
    display: block;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.period-indicator {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2em;
}

.period-indicator.auto {
    background: #ff6b35;
    animation: pulse 1s infinite;
}

.period-indicator.teleop {
    background: #4ecdc4;
}

.period-indicator.endgame {
    background: #ff3366;
    animation: pulse 0.5s infinite;
}

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

.time-display {
    font-size: 2.5em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.7);
}

/* Match Setup */
.match-setup {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.match-setup h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    text-align: center;
}

.setup-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #00d4ff;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
}

.alliance-buttons {
    display: flex;
    gap: 15px;
}

.alliance-btn {
    flex: 1;
    padding: 15px;
    border: 3px solid;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.alliance-btn.red {
    border-color: #ff3333;
}

.alliance-btn.blue {
    border-color: #3366ff;
}

.alliance-btn.red:hover {
    background: #ff3333;
    transform: scale(1.05);
}

.alliance-btn.blue:hover {
    background: #3366ff;
    transform: scale(1.05);
}

.alliance-btn.selected.red {
    background: #ff3333;
    box-shadow: 0 0 20px #ff3333;
}

.alliance-btn.selected.blue {
    background: #3366ff;
    box-shadow: 0 0 20px #3366ff;
}

.position-buttons {
    display: flex;
    gap: 10px;
}

.position-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 212, 255, 0.1);
    color: white;
}

.position-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.position-btn.selected {
    background: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    color: #1a1a2e;
}

.start-match-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.start-match-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

/* Scouting Interface */
.scouting-interface {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar Layout */
.scouting-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: 600px;
}

/* Scoring Sidebar */
.scoring-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.scoring-sidebar h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
}

/* Sidebar Score Panel */
.sidebar-score-panel {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.sidebar-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.sidebar-score-item.total {
    border-top: 2px solid #00d4ff;
    padding-top: 12px;
    margin-top: 8px;
}

.sidebar-score-label {
    font-size: 0.9em;
    color: #aaa;
    font-weight: bold;
}

.sidebar-score-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

.sidebar-score-item.total .sidebar-score-value {
    color: #00d4ff;
    font-size: 1.6em;
}

.sidebar-score-item.ball-count {
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid #ffa500;
    border-radius: 8px;
    padding: 8px;
    margin-top: 10px;
}

.sidebar-score-item.ball-count .sidebar-score-value {
    color: #ffa500;
    font-size: 1.8em;
}

/* Miss button styling */
.miss-btn {
    background: rgba(255, 51, 51, 0.2) !important;
    border-color: #ff3333 !important;
}

.miss-btn:hover {
    background: rgba(255, 51, 51, 0.4) !important;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h4 {
    color: #00d4ff;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-section.auto-section h4 {
    color: #ff6b35;
}

.sidebar-section.teleop-section h4 {
    color: #4ecdc4;
}

.sidebar-section.endgame-section h4 {
    color: #ffd93d;
}

/* Sidebar Action Buttons */
.sidebar-action-btn {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-action-btn:active {
    transform: translateX(5px) scale(0.98);
}

.sidebar-action-btn .btn-label {
    flex: 1;
    text-align: left;
}

.sidebar-action-btn .btn-points {
    font-size: 0.85em;
    color: #00ff88;
    opacity: 0.8;
}

.sidebar-action-btn .btn-count {
    background: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    min-width: 30px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* Auto Button Colors */
.sidebar-action-btn.auto-btn {
    border-color: rgba(255, 107, 53, 0.4);
    background: rgba(255, 107, 53, 0.1);
}

.sidebar-action-btn.auto-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}

.sidebar-action-btn.auto-btn .btn-count {
    background: rgba(255, 107, 53, 0.3);
    color: #ff6b35;
}

/* Teleop Button Colors */
.sidebar-action-btn.teleop-btn {
    border-color: rgba(78, 205, 196, 0.4);
    background: rgba(78, 205, 196, 0.1);
}

.sidebar-action-btn.teleop-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
}

.sidebar-action-btn.teleop-btn .btn-count {
    background: rgba(78, 205, 196, 0.3);
    color: #4ecdc4;
}

/* Endgame Button Colors */
.sidebar-action-btn.endgame-btn {
    border-color: rgba(255, 217, 61, 0.4);
    background: rgba(255, 217, 61, 0.1);
}

.sidebar-action-btn.endgame-btn:hover {
    background: rgba(255, 217, 61, 0.2);
    border-color: #ffd93d;
}

.sidebar-action-btn.endgame-btn .btn-count {
    background: rgba(255, 217, 61, 0.3);
    color: #ffd93d;
}

/* Other Button Colors */
.sidebar-action-btn.other-btn {
    border-color: rgba(155, 89, 182, 0.4);
    background: rgba(155, 89, 182, 0.1);
}

.sidebar-action-btn.other-btn:hover {
    background: rgba(155, 89, 182, 0.2);
    border-color: #9b59b6;
}

.sidebar-action-btn.other-btn .btn-count {
    background: rgba(155, 89, 182, 0.3);
    color: #9b59b6;
}

/* Toggle Button Active State */
.sidebar-action-btn.active-toggle {
    background: rgba(0, 255, 136, 0.2) !important;
    border-color: #00ff88 !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.sidebar-action-btn.active-toggle .btn-count {
    background: rgba(0, 255, 136, 0.4) !important;
    color: #00ff88 !important;
}

/* Center Content */
.center-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Info Bar */
.top-info-bar {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.score-cards-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.score-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    min-width: 100px;
}

.score-card.total-card {
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid #00d4ff;
}

.score-card-label {
    display: block;
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: bold;
}

.score-card-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

.score-card.total-card .score-card-value {
    color: #00d4ff;
    font-size: 2.2em;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Score Panel */
.score-panel {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 20px;
}

.score-panel h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    text-align: center;
}

.score-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.score-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-item.total {
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid #00d4ff;
}

.score-label {
    display: block;
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 5px;
}

.score-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

/* Action Sections */
.action-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.action-section h3 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.action-section h4 {
    margin: 15px 0 10px 0;
    color: #00d4ff;
    font-size: 1em;
}

.auto-section {
    border-color: #ff6b35;
}

.teleop-section {
    border-color: #4ecdc4;
}

.endgame-section {
    border-color: #ff3366;
}

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

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    padding: 20px;
    border: 2px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s;
}

.action-btn:active::before {
    left: 100%;
}

.auto-btn {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    color: #fff;
}

.auto-btn:hover {
    background: rgba(255, 107, 53, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.teleop-btn {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
    color: #fff;
}

.teleop-btn:hover {
    background: rgba(78, 205, 196, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.endgame-btn {
    background: rgba(255, 51, 102, 0.2);
    border-color: #ff3366;
    color: #fff;
}

.endgame-btn:hover {
    background: rgba(255, 51, 102, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.other-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: #aaa;
    color: #fff;
}

.other-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.disabled-btn {
    border-color: #ff0000;
}

.disabled-btn:hover {
    background: rgba(255, 0, 0, 0.3);
}

.btn-label {
    font-size: 1.1em;
}

.btn-points {
    font-size: 0.9em;
    color: #00ff88;
}

.btn-count {
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ff88;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    min-width: 30px;
    text-align: center;
}

/* Active toggle state for single-use actions */
.action-btn.active-toggle {
    border-width: 3px;
    box-shadow: 0 0 25px currentColor;
}

.auto-btn.active-toggle {
    background: rgba(255, 107, 53, 0.7) !important;
    border-color: #ffaa00;
}

.endgame-btn.active-toggle {
    background: rgba(255, 51, 102, 0.7) !important;
    border-color: #ff66aa;
}

.action-btn.active-toggle .btn-count {
    background: rgba(0, 255, 136, 0.9);
    color: #000;
    font-weight: bold;
}

/* Field Map Section */
.field-map-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.field-map-section h3 {
    color: #00d4ff;
    margin-bottom: 10px;
}

.ball-count-display {
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid #ffa500;
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ball-count-label {
    font-size: 1em;
    color: #ffa500;
    font-weight: bold;
}

.ball-count-value {
    font-size: 1.8em;
    color: #ffa500;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    min-width: 30px;
    text-align: center;
}

.field-instructions {
    color: #aaa;
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: center;
}

.field-mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.mode-btn.active {
    background: #00d4ff;
    color: #1a1a2e;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.mode-btn.clear-mode {
    border-color: #ff6666;
    background: rgba(255, 51, 51, 0.1);
}

.mode-btn.clear-mode:hover {
    background: rgba(255, 51, 51, 0.3);
}

.field-map-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#fieldCanvas {
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 8px;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
    background: #1a1a2e;
}

#fieldCanvas:hover {
    border-color: #00d4ff;
}

.field-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #ffffff;
}

.marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.pickup-marker {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.shoot-marker {
    background: #ff6b35;
    box-shadow: 0 0 8px #ff6b35;
}

.defense-marker {
    background: #9d4edd;
    box-shadow: 0 0 8px #9d4edd;
}

.score-marker {
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
}

/* Notes Section */
.notes-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.notes-section h3 {
    color: #00d4ff;
    margin-bottom: 10px;
}

#matchNotes {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
}

#matchNotes:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
}

/* Timeline Section */
.timeline-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.timeline-section h3 {
    color: #00d4ff;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: rgba(26, 26, 46, 0.95);
    padding-bottom: 10px;
    z-index: 1;
}

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

.timeline-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item.auto {
    border-color: #ff6b35;
}

.timeline-item.teleop {
    border-color: #4ecdc4;
}

.timeline-item.endgame {
    border-color: #ff3366;
}

.timeline-item.other {
    border-color: #aaa;
}

.timeline-time {
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

.timeline-action {
    flex: 1;
    margin: 0 15px;
}

.timeline-points {
    color: #00d4ff;
    font-weight: bold;
}

/* Control Buttons */
.control-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.control-btn {
    padding: 15px;
    border: 2px solid #00d4ff;
    border-radius: 10px;
    background: rgba(0, 212, 255, 0.1);
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.reset-btn {
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.1);
}

.reset-btn:hover {
    background: rgba(255, 51, 51, 0.3);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5em;
    }

    .timer-display {
        flex-direction: column;
        gap: 15px;
    }

    .time-display {
        font-size: 2em;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .control-buttons {
        grid-template-columns: 1fr;
    }

    .score-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Field Background (optional overlay) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Images/Field.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* Save Button */
.save-btn {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.save-btn:hover {
    background: rgba(0, 255, 136, 0.3);
}

/* ===============================================
   DASHBOARD STYLES
   =============================================== */

.dashboard-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.dashboard-section h2 {
    color: #00d4ff;
    margin-bottom: 25px;
    text-align: center;
    font-size: 2em;
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Dashboard Filters */
.dashboard-filters {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    color: #00d4ff;
    font-weight: bold;
    font-size: 0.9em;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #00d4ff;
}

.filter-group select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* Statistics Summary */
.stats-summary {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.stats-summary h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.stat-label {
    display: block;
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

/* Data Table */
.data-table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.data-table-container h3 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: rgba(0, 212, 255, 0.2);
    z-index: 10;
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: #00d4ff;
    font-weight: bold;
    border-bottom: 2px solid #00d4ff;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.15);
    cursor: pointer;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:nth-child(even):hover {
    background: rgba(0, 212, 255, 0.15);
}

.alliance-red {
    color: #ff6666;
    font-weight: bold;
}

.alliance-blue {
    color: #6666ff;
    font-weight: bold;
}

.row-actions {
    display: flex;
    gap: 8px;
}

.action-icon-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00d4ff;
    border-radius: 5px;
    padding: 5px 10px;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}

.action-icon-btn:hover {
    background: rgba(0, 212, 255, 0.4);
}

.delete-btn {
    background: rgba(255, 51, 51, 0.2);
    border-color: #ff3333;
    color: #ff6666;
}

.delete-btn:hover {
    background: rgba(255, 51, 51, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #ff3366;
    transform: scale(1.2);
}

.modal-content h2 {
    color: #00d4ff;
    margin-bottom: 20px;
}

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

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    display: block;
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 5px;
}

.detail-value {
    display: block;
    font-size: 1.2em;
    color: #00ff88;
    font-weight: bold;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-controls {
        flex-direction: column;
    }

    .dashboard-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table {
        font-size: 0.85em;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* ===============================================
   DEFENSE MODE STYLES
   =============================================== */

.defense-mode-btn {
    background: rgba(255, 165, 0, 0.2) !important;
    border-color: #ffa500 !important;
}

.defense-mode-btn:hover {
    background: rgba(255, 165, 0, 0.4) !important;
    transform: scale(1.05);
}

.defense-mode-btn.active-defense {
    background: rgba(255, 0, 0, 0.5) !important;
    border-color: #ff0000 !important;
    animation: defensePulse 1s infinite;
}

@keyframes defensePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 165, 0, 0.9); }
}

.defense-section {
    background: rgba(255, 165, 0, 0.1);
    border: 2px solid #ffa500;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
}

.defense-section h4 {
    color: #ffa500;
    text-align: center;
    margin-bottom: 15px;
}

.defense-timer {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #ffa500;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.defense-timer-label {
    display: block;
    font-size: 0.85em;
    color: #ffa500;
    margin-bottom: 5px;
}

.defense-timer-value {
    display: block;
    font-size: 1.8em;
    color: #00ff88;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.defense-btn {
    background: rgba(255, 165, 0, 0.2) !important;
    border-color: #ffa500 !important;
    margin-bottom: 10px;
}

.defense-btn:hover {
    background: rgba(255, 165, 0, 0.4) !important;
}

.exit-defense-btn {
    background: rgba(0, 212, 255, 0.2) !important;
    border-color: #00d4ff !important;
    margin-top: 5px;
}

.exit-defense-btn:hover {
    background: rgba(0, 212, 255, 0.4) !important;
}

/* ===============================================
   CUSTOM NOTIFICATION POPUP
   =============================================== */

.notification-popup {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.notification-popup.show {
    top: 30px;
    opacity: 1;
    pointer-events: auto;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
    min-width: 300px;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.notification-icon {
    font-size: 1.8em;
    flex-shrink: 0;
}

.notification-message {
    color: #ffffff;
    font-size: 1em;
    line-height: 1.4;
    flex: 1;
}

.notification-close {
    background: transparent;
    border: none;
    color: #00d4ff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 212, 255, 0.2);
    color: #ff3366;
    transform: rotate(90deg);
}

/* Notification types */
.notification-popup.success .notification-content {
    border-color: #00ff88;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.4);
}

.notification-popup.success .notification-icon {
    color: #00ff88;
}

.notification-popup.error .notification-content {
    border-color: #ff3366;
    box-shadow: 0 10px 40px rgba(255, 51, 102, 0.4);
}

.notification-popup.error .notification-icon {
    color: #ff3366;
}

.notification-popup.warning .notification-content {
    border-color: #ffaa00;
    box-shadow: 0 10px 40px rgba(255, 170, 0, 0.4);
}

.notification-popup.warning .notification-icon {
    color: #ffaa00;
}

.notification-popup.info .notification-content {
    border-color: #00d4ff;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
}

.notification-popup.info .notification-icon {
    color: #00d4ff;
}
