/* ============================================================
   DCPROSENS TOOLS — Plugin Styles
   Prefix: dc-   (no conflicts with theme or WP core)
   ============================================================ */

/* ---------- Design tokens (mirrored from theme) ---------- */
.dc-converter-card,
.dc-sens-finder,
.dc-fps-wrapper {
    --primary:        #00ff9d;
    --secondary:      #7000ff;
    --bg-dark:        #050507;
    --bg-card:        #0f1014;
    --bg-elevated:    #16181e;
    --border:         rgba(255,255,255,0.07);
    --text-primary:   #ffffff;
    --text-secondary: #b0b0b8;
    --text-muted:     #888894;
    --radius-lg:      16px;
    --radius-md:      10px;
    --radius-sm:      6px;
    --transition:     0.2s ease;
}

/* ---------- Shared card wrapper ---------- */
.dc-converter-card {
    background:    var(--bg-card);
    border:        1px solid var(--border);
    border-radius: var(--radius-lg);
    padding:       2rem;
    margin:        0 auto 1.5rem;
    max-width:     900px;
    width:         100%;
    box-sizing:    border-box;
}

/* ---------- Two-column grid ---------- */
.dc-converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 640px) {
    .dc-converter-grid { grid-template-columns: 1fr; }
}

/* ---------- Two-column inside one panel ---------- */
.dc-inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
@media (max-width: 480px) {
    .dc-inline-grid { grid-template-columns: 1fr; }
}

/* ---------- Labels & inputs ---------- */
.dc-section-title {
    font-size:     0.7rem;
    font-weight:   700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color:         var(--primary);
    margin-bottom: 1rem;
}
.dc-label {
    display:       block;
    font-size:     0.8rem;
    font-weight:   600;
    color:         var(--text-secondary);
    margin-bottom: 0.4rem;
}
.dc-label-hint {
    display:    block;
    font-size:  0.75rem;
    font-weight:400;
    color:      var(--text-muted);
    margin-top: 0.15rem;
}
.dc-input-group {
    margin-bottom: 0.75rem;
}
.dc-input,
.dc-select {
    width:         100%;
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-sm);
    color:         var(--text-primary);
    font-size:     1rem;
    padding:       0.6rem 0.85rem;
    box-sizing:    border-box;
    outline:       none;
    transition:    border-color var(--transition);
    font-family:   inherit;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance:    none;
}
.dc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888894' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}
.dc-select option { background: #1a1b22; color: #fff; }
.dc-input:focus,
.dc-select:focus {
    border-color: var(--primary);
    box-shadow:   0 0 0 3px rgba(0,255,157,0.12);
}
.dc-input::placeholder { color: var(--text-muted); }
.dc-input[type="number"] { -moz-appearance: textfield; }
.dc-input[type="number"]::-webkit-inner-spin-button,
.dc-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ---------- Result box ---------- */
.dc-result-box {
    background:    var(--bg-elevated);
    border:        1px solid rgba(0,255,157,0.2);
    border-radius: var(--radius-md);
    padding:       1.25rem;
    text-align:    center;
    margin-top:    0.75rem;
}
.dc-result-label {
    font-size:     0.75rem;
    font-weight:   600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color:         var(--text-muted);
    margin-bottom: 0.35rem;
}
.dc-result-value {
    font-size:   2.25rem;
    font-weight: 800;
    color:       var(--primary);
    line-height: 1;
}

/* ---------- Stats strip ---------- */
.dc-stats-grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   0.75rem;
    margin-top:            1.25rem;
}
.dc-stat {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       0.85rem;
    text-align:    center;
}
.dc-stat-label {
    font-size:   0.7rem;
    color:       var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.dc-stat-value {
    font-size:   1.2rem;
    font-weight: 700;
    color:       var(--text-primary);
}
@media (max-width:480px) {
    .dc-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Equivalence grid ---------- */
.dc-equivalence-section {
    margin-top:   2rem;
    padding-top:  1.5rem;
    border-top:   1px solid var(--border);
}
.dc-equiv-title {
    font-size:     1.25rem;
    font-weight:   700;
    color:         var(--text-primary);
    margin-bottom: 0.4rem;
}
.dc-equiv-subtitle {
    font-size:     0.875rem;
    color:         var(--text-muted);
    margin-bottom: 1.25rem;
}
.dc-equivalence-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap:                   0.75rem;
}
.dc-equiv-card {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       1rem;
    transition:    border-color var(--transition), transform var(--transition);
    cursor:        pointer;
}
.dc-equiv-card:hover {
    border-color: var(--primary);
    transform:    translateY(-2px);
}
.dc-equiv-game {
    font-size:   0.75rem;
    color:       var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dc-equiv-sens {
    font-size:   1.4rem;
    font-weight: 800;
    color:       var(--primary);
    line-height: 1.1;
}
.dc-equiv-cm {
    font-size:  0.75rem;
    color:      var(--text-muted);
    margin-top: 0.2rem;
}

/* ============================================================
   SENS FINDER
   ============================================================ */
.dc-sens-finder {
    max-width:  900px;
    margin:     0 auto;
}
.dc-input-panel {
    background:    var(--bg-card);
    border:        1px solid var(--border);
    border-radius: var(--radius-lg);
    padding:       2rem;
    margin-bottom: 1.5rem;
}
.dc-input-row {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
}
.dc-unit {
    font-size:  0.85rem;
    color:      var(--text-muted);
    font-weight:600;
    min-width:  2rem;
}
.dc-presets {
    display:   flex;
    flex-wrap: wrap;
    gap:       0.4rem;
    margin-top:0.65rem;
}
.dc-preset-btn {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: 20px;
    color:         var(--text-secondary);
    font-size:     0.78rem;
    font-weight:   600;
    padding:       0.25rem 0.65rem;
    cursor:        pointer;
    transition:    all var(--transition);
    font-family:   inherit;
}
.dc-preset-btn:hover,
.dc-preset-active {
    background:   rgba(0,255,157,0.1);
    border-color: var(--primary);
    color:        var(--primary);
}
.dc-summary-pill {
    display:        flex;
    align-items:    center;
    justify-content:space-between;
    background:     rgba(0,255,157,0.06);
    border:         1px solid rgba(0,255,157,0.2);
    border-radius:  var(--radius-md);
    padding:        0.75rem 1rem;
    margin-top:     1.25rem;
    font-size:      0.875rem;
    color:          var(--text-secondary);
    flex-wrap:      wrap;
    gap:            0.5rem;
}
.dc-pill-edpi {
    color:      var(--primary);
    font-weight:700;
}
.dc-results-panel {
    background:    var(--bg-card);
    border:        1px solid var(--border);
    border-radius: var(--radius-lg);
    padding:       2rem;
}
.dc-results-title {
    font-size:     1.4rem;
    font-weight:   700;
    color:         var(--text-primary);
    margin-bottom: 0.4rem;
}
.dc-results-subtitle {
    font-size:     0.875rem;
    color:         var(--text-muted);
    margin-bottom: 1.25rem;
}
.text-gradient {
    background:         linear-gradient(135deg, var(--primary), #00b8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip:    text;
}
.dc-table-wrapper { overflow-x: auto; }
.dc-table {
    width:           100%;
    border-collapse: collapse;
    font-size:       0.9rem;
}
.dc-table th {
    text-align:     left;
    padding:        0.65rem 0.85rem;
    font-size:      0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color:          var(--text-muted);
    border-bottom:  1px solid var(--border);
    white-space:    nowrap;
}
.dc-table td {
    padding:       0.65rem 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color:         var(--text-primary);
}
.dc-table tr:last-child td { border-bottom: none; }
.dc-table tr:hover td { background: rgba(255,255,255,0.03); }
.dc-table .sens-value {
    font-size:  1rem;
    font-weight:700;
    color:      var(--primary);
}
.dc-table .edpi-value { color: var(--text-secondary); }
.dc-copy-btn {
    background:    none;
    border:        1px solid var(--border);
    border-radius: var(--radius-sm);
    color:         var(--text-muted);
    padding:       0.3rem 0.6rem;
    font-size:     0.78rem;
    cursor:        pointer;
    transition:    all var(--transition);
    font-family:   inherit;
}
.dc-copy-btn:hover {
    border-color: var(--primary);
    color:        var(--primary);
}
.dc-info-box {
    display:     flex;
    align-items: flex-start;
    gap:         0.75rem;
    background:  rgba(0,255,157,0.05);
    border:      1px solid rgba(0,255,157,0.15);
    border-radius:var(--radius-md);
    padding:     1rem;
    margin-top:  1.25rem;
    font-size:   0.85rem;
    color:       var(--text-secondary);
}
.dc-info-box p { margin: 0; }

/* ============================================================
   SHARED PANEL CARD (ADS + PSA)
   ============================================================ */
.dc-panel-card {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       1.25rem;
}
.dc-panel-title {
    font-size:     1rem;
    font-weight:   700;
    color:         var(--text-primary);
    margin-bottom: 1rem;
}
.dc-quick-stat {
    display:        flex;
    justify-content:space-between;
    align-items:    center;
    margin-top:     0.75rem;
    padding-top:    0.75rem;
    border-top:     1px solid var(--border);
    font-size:      0.875rem;
    color:          var(--text-muted);
}
.dc-quick-stat strong {
    font-size:  1.1rem;
    font-weight:700;
    color:      var(--primary);
}

/* ADS result cards */
.ads-result-item {
    background:    var(--bg-card);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       0.85rem 1rem;
    margin-bottom: 0.65rem;
    display:       flex;
    justify-content:space-between;
    align-items:   center;
}
.ads-result-item:last-child { margin-bottom: 0; }
.ads-scope-label { font-size:0.8rem; color:var(--text-muted); margin-bottom:0.15rem; }
.ads-scope-name  { font-size:0.95rem; font-weight:600; color:var(--text-primary); }
.ads-result-val  { font-size:1.2rem; font-weight:700; color:var(--primary); }

/* ============================================================
   PSA CALCULATOR
   ============================================================ */
.psa-game-grid {
    display:   flex;
    flex-wrap: wrap;
    gap:       0.5rem;
    margin-bottom: 0.75rem;
}
.psa-game-btn {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: 20px;
    color:         var(--text-secondary);
    font-size:     0.85rem;
    font-weight:   600;
    padding:       0.4rem 0.9rem;
    cursor:        pointer;
    transition:    all var(--transition);
    font-family:   inherit;
}
.psa-game-btn:hover,
.psa-game-active {
    background:   rgba(0,255,157,0.1);
    border-color: var(--primary);
    color:        var(--primary);
}
.dc-btn-primary {
    display:       block;
    width:         100%;
    padding:       0.8rem 1.5rem;
    background:    linear-gradient(135deg, var(--primary), #00d4ff);
    color:         #050507;
    border:        none;
    border-radius: var(--radius-md);
    font-size:     1rem;
    font-weight:   700;
    cursor:        pointer;
    margin-top:    1rem;
    font-family:   inherit;
    transition:    opacity var(--transition);
}
.dc-btn-primary:hover { opacity: 0.88; }
.dc-btn-secondary {
    padding:       0.6rem 1.2rem;
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    color:         var(--text-secondary);
    font-size:     0.875rem;
    font-weight:   600;
    cursor:        pointer;
    font-family:   inherit;
    transition:    all var(--transition);
}
.dc-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.dc-btn-danger {
    padding:       0.6rem 1.2rem;
    background:    rgba(255,60,60,0.1);
    border:        1px solid rgba(255,60,60,0.3);
    border-radius: var(--radius-md);
    color:         #ff6b6b;
    font-size:     0.875rem;
    font-weight:   600;
    cursor:        pointer;
    font-family:   inherit;
    transition:    all var(--transition);
}
.dc-btn-danger:hover { background: rgba(255,60,60,0.2); }

/* PSA Progress */
.psa-progress-wrap {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       1.25rem;
    margin-bottom: 1.25rem;
    text-align:    center;
}
.psa-bar-wrap {
    background:    rgba(255,255,255,0.07);
    border-radius: 8px;
    height:        8px;
    margin:        0.75rem 0;
    overflow:      hidden;
}
.psa-bar {
    height:     100%;
    background: linear-gradient(90deg, var(--primary), #00d4ff);
    border-radius: 8px;
    transition: width 0.4s ease;
}
.psa-steps {
    display:   flex;
    gap:       0.3rem;
    justify-content:center;
    margin:    0.5rem 0;
}
.psa-step-dot {
    width:         10px;
    height:        10px;
    border-radius: 50%;
    border:        2px solid var(--border);
    transition:    all 0.2s;
}
.psa-step-dot.done  { background: var(--primary); border-color: var(--primary); }
.psa-step-dot.active{ border-color: var(--primary); }
.psa-progress-text { font-size:0.8rem; color:var(--text-muted); margin:0; }

/* PSA Instructions */
.psa-instructions {
    background:    rgba(0,255,157,0.04);
    border:        1px solid rgba(0,255,157,0.15);
    border-radius: var(--radius-md);
    padding:       1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size:     0.875rem;
    color:         var(--text-secondary);
}
.psa-instructions h4 { font-size:0.875rem; font-weight:700; color:var(--primary); margin-bottom:0.5rem; }
.psa-instructions ol { padding-left:1.25rem; margin:0; line-height:1.8; }

/* PSA Tester cards */
.psa-tester-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width:480px) { .psa-tester-grid { grid-template-columns:1fr; } }
.psa-tester-card {
    border-radius: var(--radius-md);
    padding:       1.25rem;
    text-align:    center;
    border:        2px solid var(--border);
}
.psa-low-card  { background: rgba(0,255,157,0.04);  border-color: rgba(0,255,157,0.2); }
.psa-high-card { background: rgba(112,0,255,0.06); border-color: rgba(112,0,255,0.25); }
.psa-tester-badge {
    font-size:  0.7rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.12em;
    margin-bottom:0.5rem;
    color: var(--text-muted);
}
.psa-tester-card h4 { font-size:0.95rem; font-weight:700; color:var(--text-primary); margin:0 0 0.6rem; }
.psa-tester-value {
    font-size:   2rem;
    font-weight: 800;
    color:       var(--primary);
    margin-bottom:0.8rem;
}
.psa-high-card .psa-tester-value { color: #b27dff; }
.dc-btn-psa-low,
.dc-btn-psa-high {
    width:         100%;
    padding:       0.6rem 1rem;
    border:        none;
    border-radius: var(--radius-sm);
    font-size:     0.875rem;
    font-weight:   700;
    cursor:        pointer;
    font-family:   inherit;
    transition:    opacity var(--transition);
}
.dc-btn-psa-low  { background: rgba(0,255,157,0.15); color: var(--primary); }
.dc-btn-psa-high { background: rgba(112,0,255,0.2);  color: #b27dff; }
.dc-btn-psa-low:hover,
.dc-btn-psa-high:hover { opacity: 0.8; }
.psa-control-bar {
    display:   flex;
    gap:       0.75rem;
    flex-wrap: wrap;
}

/* PSA Result */
.psa-glow-badge {
    display:       inline-block;
    background:    rgba(0,255,157,0.1);
    border:        1px solid rgba(0,255,157,0.3);
    border-radius: 20px;
    padding:       0.35rem 1rem;
    font-size:     0.85rem;
    font-weight:   700;
    color:         var(--primary);
    margin-bottom: 0.5rem;
}
.psa-result-display {
    background:    rgba(0,255,157,0.04);
    border:        1px solid rgba(0,255,157,0.2);
    border-radius: var(--radius-lg);
    padding:       2rem;
    margin:        1.25rem 0;
}
.psa-result-val {
    font-size:   3.5rem;
    font-weight: 900;
    color:       var(--primary);
    line-height: 1;
    margin-bottom:0.5rem;
}
.psa-edpi-table {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       1.25rem;
    margin-top:    1.25rem;
}
.psa-edpi-row {
    display:        flex;
    justify-content:space-between;
    align-items:    center;
    padding:        0.4rem 0;
    border-bottom:  1px solid var(--border);
    font-size:      0.875rem;
}
.psa-edpi-row:last-child { border-bottom:none; }
.psa-edpi-row span:first-child { color: var(--text-muted); }
.psa-edpi-row strong { color: var(--primary); font-weight:700; }

/* ============================================================
   FPS CALCULATOR
   ============================================================ */
.fps-game-tabs {
    display:   flex;
    flex-wrap: wrap;
    gap:       0.5rem;
    margin-bottom: 0.5rem;
}
.fps-game-tab {
    display:       flex;
    flex-direction:column;
    align-items:   center;
    gap:           0.2rem;
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       0.6rem 1.1rem;
    cursor:        pointer;
    font-family:   inherit;
    font-size:     0.9rem;
    font-weight:   600;
    color:         var(--text-secondary);
    transition:    all var(--transition);
}
.fps-game-tab .fps-bound {
    font-size:  0.65rem;
    text-transform:uppercase;
    letter-spacing:0.08em;
    color:      var(--text-muted);
}
.fps-game-active,
.fps-game-tab:hover {
    background:   rgba(0,255,157,0.08);
    border-color: var(--primary);
    color:        var(--primary);
}
.fps-game-active .fps-bound { color: rgba(0,255,157,0.7); }
.fps-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width:640px) { .fps-dashboard { grid-template-columns:1fr; } }
.fps-number-display {
    display:     flex;
    align-items: baseline;
    gap:         0.5rem;
    margin-top:  0.5rem;
}
.fps-big-num {
    font-size:   3rem;
    font-weight: 900;
    color:       var(--primary);
    line-height: 1;
}
.fps-unit-label {
    font-size:   0.85rem;
    font-weight: 700;
    color:       var(--text-muted);
    text-transform:uppercase;
    letter-spacing:0.1em;
}

/* Bottleneck badge */
.fps-badge-balanced,
.fps-badge-cpu,
.fps-badge-gpu {
    display:       inline-block;
    padding:       0.35rem 0.85rem;
    border-radius: 20px;
    font-size:     0.8rem;
    font-weight:   700;
    text-transform:uppercase;
    letter-spacing:0.08em;
}
.fps-badge-balanced { background:rgba(0,255,157,0.1);  color:var(--primary); border:1px solid rgba(0,255,157,0.3); }
.fps-badge-cpu      { background:rgba(255,160,60,0.1); color:#ffa03c;        border:1px solid rgba(255,160,60,0.3); }
.fps-badge-gpu      { background:rgba(112,0,255,0.1);  color:#b27dff;        border:1px solid rgba(112,0,255,0.3); }

/* Dual progress bar */
.fps-bar-wrap { margin:1rem 0; }
.fps-bar-labels {
    display:        flex;
    justify-content:space-between;
    font-size:      0.75rem;
    color:          var(--text-muted);
    font-weight:    600;
    margin-bottom:  0.4rem;
}
.fps-visual-bar {
    height:       12px;
    border-radius:8px;
    overflow:     hidden;
    display:      flex;
}
.fps-cpu-fill {
    background:  linear-gradient(90deg, #ffa03c, #ff6b6b);
    height:      100%;
    transition:  width 0.5s ease;
}
.fps-gpu-fill {
    background:  linear-gradient(90deg, #7000ff, #b27dff);
    height:      100%;
    transition:  width 0.5s ease;
}
.fps-bar-legend {
    display:        flex;
    justify-content:space-between;
    margin-top:     0.35rem;
    font-size:      0.7rem;
}
.fps-leg-cpu { color:#ffa03c; font-weight:600; }
.fps-leg-gpu { color:#b27dff; font-weight:600; }

/* Hz grid */
.fps-hz-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}
@media (max-width:480px) { .fps-hz-grid { grid-template-columns:1fr; } }
.fps-hz-card {
    background:    var(--bg-elevated);
    border:        1px solid var(--border);
    border-radius: var(--radius-md);
    padding:       1.25rem;
    text-align:    center;
    transition:    border-color var(--transition);
}
.fps-hz-card.hz-ok { border-color: rgba(0,255,157,0.3); }
.fps-hz-icon  { font-size:2rem; margin-bottom:0.4rem; }
.fps-hz-title { font-size:1.1rem; font-weight:700; color:var(--text-primary); margin-bottom:0.25rem; }
.fps-hz-status{ font-size:0.75rem; color:var(--text-muted); }
.fps-hz-card.hz-ok .fps-hz-status { color:var(--primary); }
