* {
    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 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 25px;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    animation: pulse 2s infinite;
}

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

/* Main Container */
.main-container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #00d4ff;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 0.5rem;
}

.board-list {
    list-style: none;
}

.board-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(5px);
}

.board-item.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.board-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
}

.board-status.online {
    background: #00ff88;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin: 0.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

/* Game Area */
.game-area {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.dartboard-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 2rem 0;
}

.dartboard {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #000 0deg 18deg, #fff 18deg 36deg,
        #000 36deg 54deg, #fff 54deg 72deg,
        #000 72deg 90deg, #fff 90deg 108deg,
        #000 108deg 126deg, #fff 126deg 144deg,
        #000 144deg 162deg, #fff 162deg 180deg,
        #000 180deg 198deg, #fff 198deg 216deg,
        #000 216deg 234deg, #fff 234deg 252deg,
        #000 252deg 270deg, #fff 270deg 288deg,
        #000 288deg 306deg, #fff 306deg 324deg,
        #000 324deg 342deg, #fff 342deg 360deg
    );
    border: 8px solid #8B4513;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.dartboard::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: conic-gradient(
        #ff0000 0deg 18deg, #000 18deg 36deg,
        #ff0000 36deg 54deg, #000 54deg 72deg,
        #ff0000 72deg 90deg, #000 90deg 108deg,
        #ff0000 108deg 126deg, #000 126deg 144deg,
        #ff0000 144deg 162deg, #000 162deg 180deg,
        #ff0000 180deg 198deg, #000 198deg 216deg,
        #ff0000 216deg 234deg, #000 234deg 252deg,
        #ff0000 216deg 270deg, #000 270deg 288deg,
        #ff0000 288deg 306deg, #000 306deg 324deg,
        #ff0000 324deg 342deg, #000 342deg 360deg
    );
}

.dartboard::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: #000;
}

.bullseye {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff0000;
    border: 2px solid #fff;
}

.score-display {
    text-align: center;
    margin: 2rem 0;
}

.current-score {
    font-size: 4rem;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    margin-bottom: 1rem;
}

.game-mode {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.dart-history {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.dart-score {
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-weight: 600;
}

/* Control Panel */
.control-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    height: fit-content;
}

.camera-preview {
    width: 100%;
    height: 200px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.camera-controls {
    margin-bottom: 1.5rem;
}

.camera-controls h3 {
    margin-bottom: 1rem;
    color: #00d4ff;
}

.camera-list {
    list-style: none;
    margin-bottom: 1rem;
}

.camera-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.camera-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.camera-item.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Game Controls */
.game-controls {
    margin-top: 2rem;
}

.game-controls h3 {
    margin-bottom: 1rem;
    color: #00d4ff;
}

.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Statistics */
.statistics {
    margin-top: 2rem;
}

.statistics h3 {
    margin-bottom: 1rem;
    color: #00d4ff;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    color: #ccc;
}

.stat-value {
    color: #00d4ff;
    font-weight: 600;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

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

.notification.success {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.notification.error {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.notification.info {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

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

.board-details h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item label {
    display: block;
    color: #ccc;
    margin-bottom: 5px;
    font-weight: 500;
}

.copy-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.copy-field input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.copy-field button {
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.copy-field button:hover {
    transform: scale(1.05);
}

.modal-actions {
    margin-top: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 250px 1fr 250px;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar, .control-panel {
        order: 2;
    }
    
    .game-area {
        order: 1;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    color: #00d4ff;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #00d4ff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
