:root { 
    --primary: #ff7b00; 
    --bg-dark: #0a0a0a; 
    --bg-card: #141414; 
    --text: #ffffff; 
    --text-muted: #888888; 
    --gray: #2a2a2a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background-color: var(--bg-dark); 
    color: var(--text); 
    overflow-x: hidden; 
    padding-top: 70px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 123, 0, 0.1);
}

.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.logo img.logo-img { height: 30px; width: auto; }
.logo-text-image {
    height: 26px;
    width: auto;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.logo:hover .logo-text-image {
    transform: rotate(360deg) scale(1.05);
}

nav ul { display: flex; list-style: none; gap: 1.2rem; margin: 0; padding: 0; }
nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}
nav a:hover { color: var(--primary); }

nav a.active { color: var(--primary); font-weight: 600; }
nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.lang-switcher { display: flex; gap: 0.5rem; flex-shrink: 0; }
.lang-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.lang-btn:hover, .lang-btn.active { background: var(--primary); color: #000; }

@media (max-width: 1150px) {
    header { height: auto; padding: 1rem 3%; flex-wrap: wrap; gap: 1rem; }
    body { padding-top: 140px; }
    nav { width: 100%; order: 3; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 0.8rem 1.2rem; }
    .logo-img { height: 26px; }
    .logo-text-image { height: 22px; }
}

.page-hero { padding: 60px 5% 40px; text-align: center; }
.page-hero h1 { 
    font-size: 3rem; 
    margin-bottom: 1rem; 
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

.tabs { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; padding: 0 5%; }
.tab-btn { 
    padding: 0.8rem 2rem; 
    background: var(--bg-card); 
    border: 1px solid var(--gray); 
    color: var(--text-muted); 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.3s; 
    font-size: 1rem; 
}
.tab-btn.active, .tab-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }

.test-section { display: none; max-width: 1600px; margin: 0 auto; padding: 0 5% 6rem; }
.test-section.active { display: block; }

.test-card { background: var(--bg-card); border: 1px solid var(--gray); border-radius: 20px; padding: 2rem; }

.gp-wrapper { display: grid; grid-template-columns: 1fr 800px; gap: 2rem; }
.gp-info-panel { display: flex; flex-direction: column; gap: 1.5rem; }
.gp-header-compact { background: var(--bg-dark); padding: 1rem; border-radius: 12px; border: 1px solid var(--gray); }
.gp-header-compact h2 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--text); }
.gp-header-compact p { color: var(--text-muted); font-size: 0.9rem; }
.gp-mode-badge { display: inline-block; margin-top: 0.5rem; font-size: 0.75rem !important; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 4px; background: rgba(255, 123, 0, 0.15); color: var(--primary) !important; border: 1px solid rgba(255, 123, 0, 0.3); }
.gp-mode-badge:empty { display: none; }
.gp-status-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.gp-status-box { background: var(--bg-dark); padding: 0.8rem; border-radius: 8px; text-align: center; border: 1px solid var(--gray); }
.gp-status-box .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.3rem; }
.gp-status-box .value { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.gp-status-box .value.yes { color: #4CAF50; }
.gp-status-box .value.no { color: #f44336; }
.gp-buttons-compact { display: grid; grid-template-columns: repeat(9, 1fr); gap: 0.4rem; }
.gp-btn-box { background: var(--bg-dark); padding: 0.6rem 0.3rem; border-radius: 6px; text-align: center; border-left: 2px solid var(--gray); transition: all 0.1s; }
.gp-btn-box.active { border-left-color: var(--primary); background: rgba(255, 123, 0, 0.1); }
.gp-btn-box .name { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.gp-btn-box .val { font-size: 0.9rem; font-weight: 700; font-family: monospace; color: var(--text); }
.gp-btn-box.active .val { color: var(--primary); }
.gp-sticks-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gp-stick-card { background: var(--bg-dark); padding: 1rem; border-radius: 12px; border: 1px solid var(--gray); }
.gp-stick-card h3 { font-size: 0.9rem; text-align: center; margin-bottom: 0.8rem; color: var(--text); }
.gp-stick-visual-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.gp-circle-wrap { width: 100px; height: 100px; position: relative; flex-shrink: 0; }
.gp-circle-svg { width: 100%; height: 100%; }
.gp-circle-segment { fill: rgba(255, 255, 255, 0.15); transition: fill 0.1s; }
.gp-circle-segment.active { fill: rgba(255, 255, 255, 0.85); }
.gp-circle-center { fill: #ffffff; }
.gp-circle-crosshair { stroke: var(--gray); stroke-width: 1; opacity: 0.6; }
.gp-circle-dot { fill: #fff; stroke: #ffffff; stroke-width: 2; transition: cx 0.05s, cy 0.05s; }
.gp-percent-display { text-align: center; }
.gp-percent-display .num { font-size: 2rem; font-weight: 700; color: #ffffff; line-height: 1; }
.gp-percent-display .lbl { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.gp-axes-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.gp-axis-box { background: var(--bg-card); padding: 0.5rem; border-radius: 6px; text-align: center; border: 1px solid var(--gray); }
.gp-axis-box .axis-label { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.gp-axis-box .axis-val { font-size: 0.9rem; font-family: monospace; color: #ffffff; font-weight: 600; }
.gp-controls-compact { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.gp-btn-control { padding: 0.6rem 1.2rem; background: var(--bg-dark); border: 2px solid var(--gray); color: var(--text); border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.3s; font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.gp-btn-control:hover { border-color: var(--primary); color: var(--primary); }
.gp-btn-control.active { background: var(--primary); color: #000; border-color: var(--primary); }
.gp-vibration-strength { display: flex; align-items: center; gap: 1rem; background: var(--bg-dark); padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--gray); }
.gp-vibration-strength label { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.gp-vibration-strength input[type="range"] { flex: 1; height: 6px; -webkit-appearance: none; appearance: none; background: var(--gray); border-radius: 3px; outline: none; cursor: pointer; }
.gp-vibration-strength input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: var(--primary); border-radius: 50%; cursor: pointer; }
.gp-vibration-strength input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: var(--primary); border-radius: 50%; cursor: pointer; border: none; }
.gp-vibration-strength #vibrationStrengthValue { font-size: 0.85rem; font-weight: 600; color: var(--primary); min-width: 44px; text-align: right; }
.gp-visual-wrap { position: sticky; top: 100px; }
.gp-svg { width: 100%; height: auto; filter: drop-shadow(0 10px 25px rgba(0,0,0,0.4)); }
.gp-btn { cursor: pointer; outline: none; touch-action: none; transform-box: fill-box; transform-origin: center; transition: filter 0.06s ease, transform 0.06s ease; }
.gp-btn.pressed { filter: brightness(1.5) saturate(1.15); transform: scale(0.94); }
#TouchPad.pressed { transform: scale(0.99); }
.deco { pointer-events: none; user-select: none; }

.keyboard-wrapper {
    background: var(--bg-dark);
    border: 1px solid var(--gray);
    border-radius: 16px;
    padding: 2rem;
}
.kb-svg {
    display: block;
    margin: 0 auto;
    width: 100%;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.key { cursor: default; }
.key .cap {
    fill: #1f1f1f;
    stroke: #333333;
    stroke-width: 1.5px;
    transition: fill 0.15s ease, stroke 0.15s ease;
}
.key.pressed .cap {
    fill: var(--primary);
    stroke: var(--primary);
}
.key .lbl {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    fill: #e0e0e0;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}
.key .sub {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 8px;
    font-weight: 500;
    fill: #777777;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}
.key.pressed .lbl,
.key.pressed .sub { fill: #000000; }
.keyboard-footer { text-align: center; color: var(--text-muted); margin-top: 1.5rem; font-size: 0.9rem; padding: 0.8rem; background: var(--bg-dark); border-radius: 12px; border: 1px solid var(--gray); }
.keyboard-reset { display: flex; justify-content: center; margin-top: 1rem; }
.audio-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.audio-block { background: var(--bg-dark); border: 1px solid var(--gray); border-radius: 12px; padding: 1.5rem; text-align: center; }
.audio-block h3 { color: var(--primary); margin-bottom: 1rem; font-size: 1.1rem; }
.volume-control { margin: 1.5rem 0; }
.volume-slider { width: 100%; height: 6px; -webkit-appearance: none; background: var(--gray); border-radius: 3px; outline: none; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; cursor: pointer; }
.audio-btn { padding: 0.7rem 1.2rem; background: var(--bg-card); border: 1px solid var(--primary); color: var(--primary); border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.3s; margin: 0.4rem; font-size: 0.9rem; }
.audio-btn:hover { background: var(--primary); color: #000; }
.audio-btn.active-mic { background: #ff3333; border-color: #ff3333; color: #fff; }
.mic-visualizer { width: 100%; height: 50px; background: var(--bg-card); border-radius: 6px; overflow: hidden; margin-top: 0.8rem; position: relative; }
.mic-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), #ff3333); transition: width 0.05s ease-out; }
.warning-text { color: #ff3333; font-size: 0.8rem; margin-top: 0.8rem; font-weight: 600; }

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--gray);
    padding: 2rem 5%;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.footer-col {
    min-width: 200px;
}
.footer-col--support {
    flex: 2;
}
.footer-col--buyers,
.footer-col--social {
    flex: 1;
}
.footer-col h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}
.footer-col a:hover { color: var(--primary); }
.footer-col--buyers a { display: block; }
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 1rem;
}
.footer-contact {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}
.footer-contact img.footer-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    object-fit: contain;
}
.footer-contact a,
.footer-contact span {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-contact a:hover { color: var(--primary); }
.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.social-link {
    display: inline-block;
    transition: transform 0.3s, filter 0.3s;
}
.social-link img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}
.social-link:hover {
    transform: translateY(-3px);
    filter: brightness(1.3);
}
.copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .gp-wrapper { grid-template-columns: 1fr; }
    .gp-visual-wrap { position: static; order: -1; }
    .gp-status-row { grid-template-columns: repeat(3, 1fr); }
    .gp-buttons-compact { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 768px) {
    .page-hero h1 { font-size: 2rem; }
    .audio-container { grid-template-columns: 1fr; }
    .gp-buttons-compact { grid-template-columns: repeat(4, 1fr); }
    .gp-sticks-compact { grid-template-columns: 1fr; }
    .gp-vibration-strength { flex-wrap: wrap; }
    .footer-container { flex-direction: column; }
    .footer-col--support,
    .footer-col--buyers,
    .footer-col--social { flex: 1; }
    .support-grid { grid-template-columns: 1fr; }
}

.privacy-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    z-index: 9999; display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.privacy-modal.active { display: flex; }
.privacy-content {
    background: var(--bg-card); border: 1px solid var(--gray);
    border-radius: 20px; padding: 2.5rem; max-width: 500px; text-align: center;
    box-shadow: 0 20px 60px rgba(255, 123, 0, 0.15);
}
.privacy-content h3 { color: var(--primary); margin-bottom: 1rem; font-size: 1.5rem; }
.privacy-content p { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; font-size: 0.95rem; }
.privacy-content a { color: var(--primary); text-decoration: underline; }
.privacy-buttons .btn { 
    width: 100%; text-align: center; cursor: pointer; border: none; font-size: 1rem;
    padding: 1rem 2.5rem; background: var(--primary); color: #000; border-radius: 50px; font-weight: 600;
}