:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --danger-color: #ef4444;
    --led-red: #ef4444;
    --led-green: #22c55e;
    --led-off: #334155;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC", "Hiragino Sans GB", "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#status-text {
    font-size: 14px;
    color: var(--text-secondary);
}

button {
    font-size: 16px;
    font-weight: 600;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

button:active {
    transform: scale(0.97);
}

.primary-btn {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.4);
}

.danger-btn {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(239, 68, 68, 0.4);
}

.hidden {
    display: none !important;
}

.led-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.3s;
}

.led-controls.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.led-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--led-off);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.indicator.on {
    background-color: var(--led-green);
    box-shadow: 0 0 20px var(--led-green);
}



h2 {
    font-size: 18px;
}

.switch-container {
    display: flex;
    gap: 12px;
    width: 100%;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    flex: 1;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

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

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

.log-title {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    margin-left: 8px; /* Aligned nicely with card curvature */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.log-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 14px;
    font-family: monospace;
    font-size: 13px;
    color: #a3e635;
    height: 140px;
    overflow-y: auto;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
