/*
Theme Name: Gamepad Tester Tool
Theme URI: https://example.com/gamepad-tester
Author: Developer
Author URI: https://example.com
Description: A professional gamepad/controller testing tool built as a WordPress theme. Test your Xbox, PlayStation, Nintendo, and other game controllers directly in your browser.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamepad-tester
Tags: gaming, gamepad, controller, tool
*/

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --glow-primary: rgba(0, 212, 255, 0.3);
    --glow-secondary: rgba(124, 58, 237, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title svg {
    width: 32px;
    height: 32px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-danger);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--accent-success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* No Controller State */
.no-controller,
.no-controller-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.no-controller-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    display: block;
    opacity: 0.5;
}

.no-controller h2,
.no-controller-state h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.no-controller p,
.no-controller-state p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 30px;
}

.instructions {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.instructions h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.instructions ol {
    text-align: left;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

/* Controller Card */
.controllers-grid {
    display: grid;
    gap: 30px;
}

.controller-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.controller-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--glow-primary);
}

.controller-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.controller-info h2 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.controller-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.controller-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Sections */
.controller-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    width: 18px;
    height: 18px;
}

/* Buttons Grid */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.button-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.button-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.15s ease;
}

.button-item.pressed {
    border-color: var(--accent-primary);
    transform: scale(0.95);
    box-shadow: 0 0 20px var(--glow-primary);
}

.button-item.pressed::before {
    opacity: 0.2;
}

.button-index {
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.button-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.button-value {
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-top: 5px;
    position: relative;
    z-index: 1;
    font-family: 'Fira Code', monospace;
}

/* Axes */
.axes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.axis-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.axis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.axis-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.axis-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--accent-primary);
}

.axis-bar-container {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.axis-bar {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: all 0.05s ease;
}

.axis-center {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: var(--text-secondary);
    opacity: 0.5;
}

/* Analog Sticks Visual */
.sticks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.stick-visual {
    text-align: center;
}

.stick-visual h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.stick-area {
    width: 150px;
    height: 150px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}

.stick-area::before,
.stick-area::after {
    content: '';
    position: absolute;
    background: var(--border-color);
}

.stick-area::before {
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
}

.stick-area::after {
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
}

.stick-dot {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--glow-primary);
    transition: all 0.05s ease;
}

.stick-coords {
    margin-top: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Triggers */
.triggers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.trigger-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.trigger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trigger-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.trigger-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--accent-primary);
}

.trigger-bar {
    height: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
}

.trigger-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    transition: width 0.05s ease;
    width: 0%;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 30px;
}

.footer-brand {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
    max-width: 500px;
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 6px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.footer-bottom .footer-note {
    font-size: 0.75rem;
    opacity: 0.7;
}

.footer-content a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Header link style */
a.site-title {
    text-decoration: none;
    color: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.25rem;
    }
    
    .controller-card {
        padding: 20px;
    }
    
    .buttons-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .axes-grid {
        grid-template-columns: 1fr;
    }
    
    .sticks-container {
        grid-template-columns: 1fr;
    }
    
    .triggers-container {
        grid-template-columns: 1fr;
    }
}

/* Vibration Test */
.vibration-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.vibration-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.vibration-btn {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vibration-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-secondary);
}

.vibration-btn:active {
    transform: translateY(0);
}

.vibration-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   SEO CONTENT SECTIONS
   ============================================ */

/* Visually Hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.hero-description strong {
    color: var(--text-primary);
}

/* Tool Section */
.tool-section {
    margin-bottom: 60px;
}

/* No Controller Updates */
.no-controller h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.instructions h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.instructions li strong {
    color: var(--text-primary);
}

/* Features Section */
.features-section {
    margin-bottom: 60px;
}

.features-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.info-card p strong {
    color: var(--text-primary);
}

/* Supported Controllers Section */
.supported-section {
    margin-bottom: 60px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.supported-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
}

.controllers-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.controller-type {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.controller-type h3 {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.controller-type ul {
    list-style: none;
    padding: 0;
}

.controller-type li {
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.controller-type li:last-child {
    border-bottom: none;
}

/* Testing Features Section */
.testing-section {
    margin-bottom: 60px;
}

.testing-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.test-features {
    display: grid;
    gap: 20px;
}

.test-feature {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.test-feature:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.test-feature h3 {
    font-size: 1.125rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.test-feature p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.test-feature p strong {
    color: var(--text-primary);
}

/* How To Section */
.howto-section {
    margin-bottom: 60px;
    padding: 40px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.howto-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
}

.step p strong {
    color: var(--text-primary);
}

/* FAQ Section */
.faq-section {
    margin-bottom: 60px;
}

.faq-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px 25px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: var(--bg-secondary);
}

.faq-item summary h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding-right: 20px;
}

.faq-item > p {
    padding: 0 25px 25px;
    color: var(--text-secondary);
    line-height: 1.8;
    border-top: 1px solid var(--border-color);
    margin: 0;
    padding-top: 20px;
}

/* About Section */
.about-section {
    margin-bottom: 60px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.about-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content p strong {
    color: var(--text-primary);
}

/* Responsive for SEO Sections */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .supported-section,
    .howto-section,
    .about-section {
        padding: 25px;
    }
    
    .controllers-list {
        grid-template-columns: 1fr 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-item summary h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .controllers-list {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   CUSTOM LOGO STYLES
   ============================================ */

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo .custom-logo-link {
    display: flex;
    align-items: center;
}

.site-logo .custom-logo {
    max-height: 40px;
    width: auto;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */

.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-title {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.error-subtitle {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.error-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 30px;
    line-height: 1.7;
}

.error-actions {
    margin-bottom: 50px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-primary);
}

.error-suggestions {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: left;
}

.error-suggestions h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.suggestions-list li a {
    display: block;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.suggestions-list li a:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* ============================================
   PAGE & POST TEMPLATES
   ============================================ */

.page-content,
.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
}

.page-header,
.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.page-title,
.post-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.post-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-thumbnail {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.page-body,
.post-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-body h2,
.post-content h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 30px 0 15px;
}

.page-body h3,
.post-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 25px 0 12px;
}

.page-body p,
.post-content p {
    margin-bottom: 20px;
}

.page-body a,
.post-content a {
    color: var(--accent-primary);
}

.page-body ul,
.page-body ol,
.post-content ul,
.post-content ol {
    margin: 0 0 20px 25px;
}

.page-body li,
.post-content li {
    margin-bottom: 8px;
}

.post-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-tags a {
    color: var(--accent-primary);
    text-decoration: none;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.post-navigation a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: var(--accent-primary);
}

/* ============================================
   SEARCH & ARCHIVE
   ============================================ */

.search-header,
.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-title,
.archive-title {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.search-title span {
    color: var(--accent-primary);
}

.archive-description {
    color: var(--text-secondary);
    margin-top: 10px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.result-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.result-title a:hover {
    color: var(--accent-primary);
}

.result-excerpt {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.result-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.no-results,
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.no-results h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.suggested-tools h3,
.tools-list {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.tools-list {
    list-style: none;
    padding: 0;
}

.tools-list li {
    margin-bottom: 10px;
}

.tools-list a {
    display: block;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tools-list a:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* Posts Grid (Archive) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-card-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
}

.post-card-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.post-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-card-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination .current {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ============================================
   COMMENTS
   ============================================ */

.comments-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
}

.comments-title {
    font-size: 1.25rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

/* Comment Form */
.comment-form {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-primary);
}

/* ============================================
   FOOTER LINKS STYLES (Updated)
   ============================================ */

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent-primary);
}

@media (max-width: 900px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .error-title {
        font-size: 5rem;
    }
    
    .suggestions-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NAVIGATION MENU
   ============================================ */

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.dropdown-arrow {
    font-size: 0.625rem;
    margin-left: 4px;
    opacity: 0.7;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.8125rem;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
}

.nav-toggle-icon::before {
    top: -7px;
}

.nav-toggle-icon::after {
    bottom: -7px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Mobile Navigation */
@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 15px;
        gap: 0;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-secondary);
        margin-top: 5px;
        display: none;
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .header-status {
        display: none;
    }
}

/* ============================================
   TOOL PAGE STYLES
   ============================================ */

.tool-hero {
    text-align: center;
    padding: 40px 30px;
    margin-bottom: 30px;
}

.tool-hero .hero-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.tool-hero .hero-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
}

/* Tool Section Centering - Centers the gamepad tester tool on all tool pages */
.tool-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Connection Tips Styling */
.connection-tips {
    display: inline-block;
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--accent-primary);
}

/* Controllers Container Centering */
.controllers-container,
.controllers-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.featured-section {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid var(--accent-primary);
}

.info-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 30px;
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.info-section h3 {
    font-size: 1.125rem;
    margin: 25px 0 15px;
    color: var(--text-primary);
}

.info-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 15px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.info-list li {
    padding: 10px 0 10px 25px;
    position: relative;
    color: var(--text-secondary);
}

.info-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.info-list li strong {
    color: var(--text-primary);
}

.info-note {
    background: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 3px solid var(--accent-primary);
    margin-top: 20px;
    font-size: 0.875rem;
}

/* Score Cards */
.score-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.score-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
}

.score-card.score-good {
    border-color: var(--accent-success);
}

.score-card.score-okay {
    border-color: #60a5fa;
}

.score-card.score-warning {
    border-color: var(--accent-warning);
}

.score-card.score-bad {
    border-color: var(--accent-danger);
}

.score-range {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.score-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.score-card.score-good .score-label { color: var(--accent-success); }
.score-card.score-okay .score-label { color: #60a5fa; }
.score-card.score-warning .score-label { color: var(--accent-warning); }
.score-card.score-bad .score-label { color: var(--accent-danger); }

.score-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Benefits/Features Grid */
.benefits-grid,
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.benefit-card,
.tip-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.benefit-card h3,
.tip-card h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--accent-primary);
}

.benefit-card p,
.tip-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Controller Grid */
.controller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.controller-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.controller-item h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.controller-item p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: 25px 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table tr:hover td {
    background: var(--bg-secondary);
}

.rating-excellent { color: var(--accent-success); font-weight: 600; }
.rating-good { color: #60a5fa; font-weight: 600; }
.rating-okay { color: var(--accent-warning); font-weight: 600; }

.vibration-help {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 15px;
}

/* ============================================
   ADVANCED GAMEPAD TESTER FEATURES
   ============================================ */

/* Controller Header Updates */
.controller-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.health-badge {
    background: var(--bg-secondary);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.health-badge .health-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.health-badge .health-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Health Score Section */
.health-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(0, 212, 255, 0.1));
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.health-display {
    text-align: center;
}

.health-score-large {
    margin-bottom: 15px;
}

.health-score-large .health-score {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.health-score-large .health-max {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.health-bar {
    height: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.health-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.health-bar-fill.health-optimal {
    background: linear-gradient(90deg, var(--accent-success), #34d399);
}

.health-bar-fill.health-minor {
    background: linear-gradient(90deg, var(--accent-warning), #fbbf24);
}

.health-bar-fill.health-problems {
    background: linear-gradient(90deg, var(--accent-danger), #f87171);
}

.health-rating {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.health-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Drift Detection Section */
.drift-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
}

.drift-status {
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.875rem;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.drift-meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.drift-meter {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.drift-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.drift-meter-header span:first-child {
    color: var(--text-secondary);
}

.drift-left-score,
.drift-right-score {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: var(--accent-primary);
}

.drift-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.drift-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.2s ease;
    width: 0%;
}

.drift-bar-fill.drift-good {
    background: var(--accent-success);
}

.drift-bar-fill.drift-warn {
    background: var(--accent-warning);
}

.drift-bar-fill.drift-bad {
    background: var(--accent-danger);
}

.drift-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Polling Rate Section */
.polling-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
}

.polling-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 15px;
}

.polling-main {
    text-align: center;
}

.polling-avg {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Fira Code', monospace;
}

.polling-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.polling-minmax {
    display: flex;
    gap: 20px;
}

.polling-stat {
    text-align: center;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.polling-stat span:first-child {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

.polling-stat span:last-child {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.polling-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Latency Test Section */
.latency-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
}

.latency-test {
    text-align: center;
}

.latency-target {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--accent-danger);
    border-radius: 12px;
    transition: all 0.1s ease;
}

.latency-target.active {
    background: var(--accent-success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
}

.latency-status {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.latency-start-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.latency-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-primary);
}

.latency-results {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.latency-result {
    text-align: center;
    padding: 15px 25px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.latency-result span:first-child {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Fira Code', monospace;
}

.latency-result span:last-child {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.latency-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 15px;
}

/* Stick Canvas & Deadzone */
.stick-area {
    position: relative;
}

.stick-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
}

.stick-deadzone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px dashed var(--accent-warning);
    border-radius: 50%;
    opacity: 0.5;
}

.calibration-range {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.calibration-range span {
    font-family: 'Fira Code', monospace;
    color: var(--accent-primary);
}

.calibration-help {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* Advanced Vibration Sliders */
.vibration-sliders {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.slider-group .slider-value {
    color: var(--accent-primary);
    font-family: 'Fira Code', monospace;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-primary);
    border-radius: 4px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.vibration-custom-btn {
    width: 100%;
    margin-top: 10px;
}

/* Export Section */
.export-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
}

.export-controls {
    text-align: center;
    margin-bottom: 15px;
}

.export-btn {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-secondary);
}

.export-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Responsive for Advanced Features */
@media (max-width: 768px) {
    .drift-meters {
        grid-template-columns: 1fr;
    }
    
    .polling-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .latency-results {
        flex-wrap: wrap;
    }
    
    .health-score-large .health-score {
        font-size: 2.5rem;
    }
    
    .polling-avg {
        font-size: 2rem;
    }
}
