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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
}

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

h1 {
    color: #ffffff;
    margin-bottom: 24px;
    font-size: 24px;
}

h2 {
    color: #cccccc;
    font-size: 18px;
    margin-bottom: 12px;
}

.section {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2 {
    margin-bottom: 0;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 12px;
    color: #858585;
    font-weight: 500;
}

/* Compact Switch Style */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3e3e42;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #007acc;
}

input:checked+.slider:before {
    transform: translateX(14px);
}

.status-text {
    color: #858585;
    font-size: 14px;
    margin-top: 8px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f44336;
    display: inline-block;
}

.status-dot.connected {
    background: #4caf50;
}

.status-dot.connecting {
    background: #ff9800;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.info-box {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 12px;
    margin-top: 12px;
}

.info-box p {
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

code {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: #dcdcaa;
    flex: 1;
    min-width: 200px;
}

button {
    background: #0e639c;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

button:hover {
    background: #1177bb;
}

button:active {
    background: #0a4f77;
}

button:disabled {
    background: #3e3e42;
    color: #858585;
    cursor: not-allowed;
}

.btn-secondary {
    background: #3e3e42;
}

.btn-secondary:hover {
    background: #505050;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.setting-item label {
    min-width: 100px;
}

input[type="number"] {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: #d4d4d4;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    width: 100px;
}

input[type="number"]:focus {
    outline: 1px solid #007acc;
    outline-offset: -1px;
}

.help-text {
    color: #858585;
    font-size: 12px;
    margin-top: 8px;
}

.log-container {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    margin-bottom: 8px;
}

.log-entry {
    margin-bottom: 4px;
    color: #858585;
}

.log-entry.error {
    color: #f48771;
}

.log-entry.success {
    color: #4ec9b0;
}

.log-entry.info {
    color: #569cd6;
}

#log-output:empty::before {
    content: 'No logs yet...';
    color: #858585;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 6px;
    min-height: 320px;
    margin: 10px 0;
}

.qr-loading,
.qr-error {
    color: #858585;
    font-style: italic;
    text-align: center;
}

.qr-container img {
    display: block;
    max-width: 280px;
    height: auto;
}