/**
 * assets/css/gamepad.css
 * Professional 4-Grid Layout Styles for Gamepad Tester
 * Optimized for KeyTest.io with SEO and high-performance visuals.
 */

.gamepad-page-pro {
    background: #0a0e27;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 2rem;
    border-radius: 24px;
}

.main-header-pro {
    padding: 30px 0;
    margin-bottom: 40px;
}

.breadcrumb-pro {
    margin-bottom: 20px;
    font-size: 0.85em;
    color: #4299e1;
}

.breadcrumb-pro a {
    color: #4299e1;
    text-decoration: none;
}

.breadcrumb-pro a:hover {
    text-decoration: underline;
}

.title-pro {
    font-size: 2.8em;
    background: linear-gradient(135deg, #4299e1, #ed8936);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    font-weight: 800;
}

.subhead-pro {
    font-size: 1.2em;
    color: #8b92b0;
    max-width: 800px;
    margin-bottom: 40px;
}

/* Tool Section */
.tool-section-pro {
    background: #0f1328;
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 60px;
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.tool-header-pro {
    text-align: center;
    margin-bottom: 30px;
}

.status-badge-pro {
    display: inline-block;
    background: #2d3458;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-top: 10px;
}

/* Gamepads Grid */
.gamepads-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.gamepad-card-pro {
    background: #1a1f3a;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(66, 153, 225, 0.2);
    transition: all 0.3s ease;
}

.gamepad-card-pro.active {
    border-color: #4299e1;
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.2);
}

.card-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.controller-icon-pro { font-size: 2em; }
.controller-name-pro { font-weight: 600; color: #4299e1; font-size: 0.9em; word-break: break-word; flex: 1; margin: 0 10px; }
.connection-led-pro { width: 12px; height: 12px; border-radius: 50%; background: #f56565; box-shadow: 0 0 5px #f56565; }
.connection-led-pro.connected { background: #48bb78; box-shadow: 0 0 8px #48bb78; }

.buttons-container-pro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.button-key-pro {
    background: #0f1328;
    border: 1px solid #2d3458;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    transition: all 0.05s linear;
    font-size: 0.7em;
    color: #e0e0e0;
}

.button-key-pro.pressed {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-color: #63b3ed;
    transform: scale(0.96);
    box-shadow: 0 0 10px rgba(66,153,225,0.5);
    color: #fff;
}

.key-label-pro { font-weight: 600; margin-bottom: 2px; }
.key-value-pro { font-size: 0.65em; color: #8b92b0; }

.joysticks-row-pro {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.joystick-wrapper-pro { flex: 1; text-align: center; }
.joystick-canvas-pro { background: #0f1328; border-radius: 50%; border: 2px solid #2d3458; width: 100%; max-width: 120px; height: auto; }
.drift-meter-pro { margin-top: 10px; padding: 8px; background: #0f1328; border-radius: 8px; }
.meter-label-pro { font-size: 0.7em; display: flex; justify-content: space-between; margin-bottom: 5px; }
.meter-bar-pro { height: 6px; background: #2d3458; border-radius: 3px; overflow: hidden; }
.meter-fill-pro { height: 100%; width: 0%; transition: width 0.2s; border-radius: 3px; }
.meter-fill-pro.low { background: #48bb78; }
.meter-fill-pro.medium { background: #ed8936; }
.meter-fill-pro.high { background: #f56565; }
.drift-warning-pro { font-size: 0.65em; padding: 2px 6px; border-radius: 12px; }
.drift-low-pro { background: rgba(72,187,120,0.2); color: #48bb78; }
.drift-medium-pro { background: rgba(237,137,54,0.2); color: #ed8936; }
.drift-high-pro { background: rgba(245,101,101,0.2); color: #f56565; }

.trigger-item-pro { margin-bottom: 12px; }
.trigger-label-pro { font-size: 0.75em; display: flex; justify-content: space-between; margin-bottom: 6px; color: #8b92b0; }
.trigger-bar-bg-pro { background: #0f1328; height: 28px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.trigger-bar-fill-pro { background: linear-gradient(90deg, #4299e1, #ed8936); height: 100%; width: 0%; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 0.75em; font-weight: bold; color: #fff; }

.vibration-test-btn-pro {
    width: 100%;
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.1s, filter 0.2s;
}
.vibration-test-btn-pro:hover { transform: translateY(-2px); filter: brightness(1.1); }
.vibration-test-btn-pro:active { transform: translateY(0); }

.history-panel-pro {
    background: #1a1f3a;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(66, 153, 225, 0.1);
}
.history-header-pro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.history-header-pro h3 { font-size: 1rem; color: #4299e1; text-transform: uppercase; letter-spacing: 0.05em; }
.clear-history-btn-pro { background: #2d3458; border: none; color: #e0e0e0; padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 0.8em; font-weight: 600; }
.history-list-pro { max-height: 200px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.8em; }
.history-item-pro { padding: 6px 10px; border-left: 3px solid #4299e1; margin-bottom: 6px; background: #0f1328; border-radius: 4px; color: #d0d3e0; }
.history-time-pro { color: #63b3ed; font-weight: bold; margin-right: 8px; }

/* Content Sections */
.content-section-pro {
    background: #1a1f3a;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(66, 153, 225, 0.15);
}
.content-section-pro h2 { color: #4299e1; margin-bottom: 25px; font-size: 2em; font-weight: 800; border-left: 5px solid #ed8936; padding-left: 15px; }
.content-section-pro h3 { color: #ed8936; margin: 30px 0 15px 0; font-weight: 700; }
.content-section-pro p { margin-bottom: 20px; color: #d0d3e0; font-size: 1.05rem; }
.content-section-pro ul, .content-section-pro ol { margin-left: 25px; margin-bottom: 25px; color: #d0d3e0; }
.content-section-pro li { margin-bottom: 10px; }

.feature-grid-pro { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin: 35px 0; }
.feature-card-pro { background: #0f1328; padding: 25px; border-radius: 20px; border-left: 4px solid #4299e1; transition: transform 0.3s; }
.feature-card-pro:hover { transform: translateY(-5px); }
.feature-card-pro h3 { margin-top: 0; color: #4299e1; font-size: 1.2rem; }

.controller-list-pro { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 25px 0; }
.controller-item-pro { background: #0f1328; padding: 15px; border-radius: 12px; text-align: center; border: 1px solid #2d3458; font-weight: 600; font-size: 0.9em; }

.faq-item-pro { background: #0f1328; padding: 25px; margin: 20px 0; border-radius: 16px; border-left: 4px solid #ed8936; }
.faq-item-pro strong { color: #ed8936; display: block; margin-bottom: 10px; font-size: 1.1rem; }

.table-pro { width: 100%; border-collapse: collapse; margin: 30px 0; background: #0f1328; border-radius: 16px; overflow: hidden; border: 1px solid #2d3458; }
.table-pro th, .table-pro td { padding: 15px; text-align: left; border-bottom: 1px solid #2d3458; }
.table-pro th { background: rgba(66, 153, 225, 0.1); color: #4299e1; font-weight: 800; text-transform: uppercase; font-size: 0.85em; }

.cta-button-pro { display: inline-block; background: linear-gradient(135deg, #4299e1, #3182ce); color: white; padding: 16px 40px; border-radius: 50px; text-decoration: none; font-weight: 800; margin: 20px 0; transition: all 0.3s; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3); }
.cta-button-pro:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4); filter: brightness(1.1); }

@media (max-width: 768px) {
    .title-pro { font-size: 2em; }
    .tool-section-pro { padding: 20px; }
    .gamepads-grid-pro { grid-template-columns: 1fr; }
    .buttons-container-pro { grid-template-columns: repeat(3, 1fr); }
    .content-section-pro { padding: 25px; }
}
