 :root {
            --color-bg: #0a192f;
            --color-surface: rgba(17, 34, 64, 0.3);
            --color-border: rgba(100, 255, 218, 0.15);
            --color-x: #00b4d8;
            --color-y: #ff6d6d;
            --color-accent: #64ffda;
            --color-text: #e6f1ff;
            --color-muted: #8892b0;
            --color-code-bg: rgba(0, 0, 0, 0.3);
            --color-code-text: #f8f8f2;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            background: var(--color-bg);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui;
            color: var(--color-text);
            padding: 20px;
            line-height: 1.6;
        }

        /* Header */
        .header {
            max-width: 800px;
            text-align: center;
            margin-bottom: 40px;
        }

        .title {
            font-size: 32px;
            font-weight: 300;
            margin-bottom: 10px;
            color: var(--color-accent);
            letter-spacing: -0.5px;
        }

        .subtitle {
            font-size: 16px;
            color: var(--color-muted);
            font-weight: 400;
        }

        /* Main Layout */
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 5px;
            max-width: 1200px;
            width: 100%;
            margin-bottom: 20px;
        }

        @media (max-width: 1024px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Demo Panel */
        .demo-panel {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 4px;
            padding: 30px;
            height: fit-content;
        }

        .panel-title {
            font-size: 18px;
            color: var(--color-accent);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--color-border);
            font-weight: 500;
        }

        /* Accelerometer Demo */
        .demo-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        @media (max-width: 640px) {
            .demo-grid {
                grid-template-columns: 1fr;
            }
        }

        .accel-demo {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .accel-label {
            font-size: 13px;
            color: var(--color-muted);
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 500;
        }

        /* Horizontal Accelerometer */
        .h-accel {
            position: relative;
            width: 200px;
            height: 60px;
        }

        .h-track {
            position: absolute;
            width: 160px;
            height: 3px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 1.5px;
            left: 20px;
            top: 28.5px;
            transition: background-color 0.3s ease;
        }

        .h-knob {
            position: absolute;
            width: 30px;
            height: 20px;
            background: var(--color-x);
            border-radius: 4px;
            left: 85px;
            top: 20px;
            cursor: grab;
            transition: left 0.1s ease, box-shadow 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 180, 216, 0.3);
        }

        .h-knob:active {
            cursor: grabbing;
            box-shadow: 0 4px 16px rgba(0, 180, 216, 0.5);
        }

        /* Vertical Accelerometer */
        .v-accel {
            position: relative;
            width: 60px;
            height: 200px;
        }

        .v-track {
            position: absolute;
            width: 3px;
            height: 160px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 1.5px;
            left: 28.5px;
            top: 20px;
            transition: background-color 0.3s ease;
        }

        .v-knob {
            position: absolute;
            width: 20px;
            height: 30px;
            background: var(--color-y);
            border-radius: 4px;
            left: 20px;
            top: 85px;
            cursor: grab;
            transition: top 0.1s ease, box-shadow 0.3s ease;
            box-shadow: 0 2px 8px rgba(255, 109, 109, 0.3);
        }

        .v-knob:active {
            cursor: grabbing;
            box-shadow: 0 4px 16px rgba(255, 109, 109, 0.5);
        }

        /* Value Displays */
        .value {
            margin-top: 15px;
            font-size: 20px;
            font-family: 'SF Mono', monospace;
        }

        .value.x { color: var(--color-x); }
        .value.y { color: var(--color-y); }

        /* Result Display */
        .result-box {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
            text-align: center;
        }

        .coords {
            font-size: 24px;
            font-family: 'SF Mono', monospace;
            margin: 10px 0;
        }

        .coord.x { color: var(--color-x); }
        .coord.y { color: var(--color-y); }

        .angle {
            font-size: 18px;
            color: var(--color-accent);
            font-family: 'SF Mono', monospace;
            margin-top: 10px;
        }

        /* Code Panel */
        .code-panel {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 4px;
            padding: 30px;
        }

        .code-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--color-border);
            padding-bottom: 10px;
        }

        .code-tab {
            padding: 8px 16px;
            background: transparent;
            border: 1px solid transparent;
            color: var(--color-muted);
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .code-tab:hover {
            background: rgba(100, 255, 218, 0.1);
        }

        .code-tab.active {
            background: rgba(100, 255, 218, 0.2);
            color: var(--color-accent);
            border-color: var(--color-accent);
        }

        .code-block {
            position: relative;
            background: var(--color-code-bg);
            border-radius: 8px;
            padding: 20px;
            font-family: 'SF Mono', monospace;
            font-size: 14px;
            line-height: 1.5;
            color: var(--color-code-text);
            overflow-x: auto;
            margin-bottom: 15px;
            max-height: 400px;
            overflow-y: auto;
        }

        .code-block pre {
            margin: 0;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .copy-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 6px 12px;
            background: rgba(100, 255, 218, 0.1);
            border: 1px solid var(--color-accent);
            color: var(--color-accent);
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .copy-btn:hover {
            background: rgba(100, 255, 218, 0.2);
        }

        /* Installation Guide */
        .guide-section {
            max-width: 1200px;
            width: 100%;
            margin-bottom: 20px;
        }

        .guide-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 5px;
            margin-top: 20px;
        }

        .guide-card {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 4px;
            padding: 20px;
        }

        .guide-title {
            font-size: 12px;
            color: var(--color-accent);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .guide-title::before {
            content: '';
            width: 8px;
            height: 8px;
            background: var(--color-accent);
            border-radius: 50%;
        }

        .guide-content {
            color: var(--color-muted);
            font-size: 14px;
            line-height: 1.6;
        }

        /* Usage Examples */
        .usage-examples {
            max-width: 1200px;
            width: 100%;
        }

        .example {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 4px;
            padding: 12px;
            margin-bottom: 5px;
        }

        .example-title {
            font-size: 16px;
            color: var(--color-accent);
            margin-bottom: 5px;
            font-weight: 500;
        }

        .example-code {
            background: var(--color-code-bg);
            border-radius: 4px;
            padding: 15px;
            font-family: 'SF Mono', monospace;
            font-size: 13px;
            color: var(--color-code-text);
            overflow-x: auto;
        }

        /* Center lines */
        .center-line {
            position: absolute;
            background: rgba(255, 255, 255, 0.1);
        }

        .h-center {
            width: 1px;
            height: 12px;
            left: 100px;
            top: 24px;
        }

        .v-center {
            width: 12px;
            height: 1px;
            left: 24px;
            top: 100px;
        }

        /* Status */
        .status {
            margin-top: 15px;
            padding: 6px 12px;
            background: rgba(100, 255, 218, 0.1);
            border: 1px solid rgba(100, 255, 218, 0.2);
            border-radius: 16px;
            font-size: 12px;
            color: var(--color-accent);
            display: inline-block;
        }
    
