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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

h1 {
    color: #00d4ff;
    font-size: 1.5rem;
}

.status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status.connected {
    background: rgba(0, 200, 80, 0.2);
    color: #00c850;
    border: 1px solid #00c850;
}

.status.disconnected {
    background: rgba(255, 80, 80, 0.2);
    color: #ff5050;
    border: 1px solid #ff5050;
}

nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.5rem 1.2rem;
    background: #16213e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab:hover {
    color: #ccc;
    border-color: #555;
}

.tab.active {
    background: #0f3460;
    color: #00d4ff;
    border-color: #00d4ff;
}

.tab-content {
    display: none;
}

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

.device-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.device-card {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}

.device-card:hover {
    border-color: #555;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.device-details {
    font-size: 0.8rem;
    color: #888;
}

.device-details span {
    margin-right: 1rem;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge.available {
    background: rgba(0, 200, 80, 0.15);
    color: #00c850;
}

.badge.in-use {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
}

.badge.attached {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid #555;
    border-radius: 8px;
    background: #16213e;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn:hover {
    background: #1a2a4e;
    border-color: #777;
}

.btn.primary {
    background: #0f3460;
    border-color: #00d4ff;
    color: #00d4ff;
}

.btn.primary:hover {
    background: #134080;
}

.btn.danger {
    border-color: #ff5050;
    color: #ff5050;
}

.btn.danger:hover {
    background: #3a1010;
}

.btn.small {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #aaa;
    font-size: 0.85rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #0d1b2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

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

.form-group small {
    color: #666;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    display: block;
}

.info-box {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #aaa;
}

.hash-display {
    background: #0d1b2a;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: #00d4ff;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.loading {
    color: #666;
    text-align: center;
    padding: 2rem;
}

.client-header {
    font-size: 0.85rem;
    color: #00d4ff;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #222;
}

.no-devices {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.auto-connect-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    user-select: none;
}

.auto-connect-label input[type="checkbox"] {
    accent-color: #00d4ff;
    cursor: pointer;
}
