/* =========================================
   ULTIMATE GAME OPTIMIZER — style.css
   WebKaar | Ayush Tiwari | 2026
========================================= */

/* ── Layout ── */
.app-body { position: relative; }
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px 140px;
}

/* ── Base Game Card ── */
.game-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* ── Wizard Header ── */
.wizard-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.wizard-icon {
    width: 56px; height: 56px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.18);
    flex-shrink: 0;
}
.wizard-title-area { flex: 1; min-width: 0; }
.wizard-title-area h2 {
    font-size: 1.3rem; font-weight: 800;
    color: var(--text-main); margin-bottom: 4px;
}
.step-subtitle {
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 12px;
}

/* ── Progress Tracker ── */
.progress-tracker {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 260px;
}
.step-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--border-color);
    flex-shrink: 0;
    transition: all 0.35s ease;
}
.step-dot.active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    transform: scale(1.35);
}
.step-dot.done { background: #10b981; }
.step-line {
    flex: 1; height: 2px;
    background: var(--border-color);
    margin: 0 6px;
    transition: background 0.35s ease;
}
.step-line.active { background: #10b981; }

/* ── Wizard Step ── */
.wizard-step { animation: fadeIn 0.35s ease; }

/* ── Form Grid ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label {
    font-size: 0.9rem; font-weight: 700;
    color: var(--text-main);
}
.required { color: #ef4444; }

/* ── Inputs & Selects ── */
.custom-input,
.custom-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
.custom-input:focus,
.custom-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.custom-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='gray' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ── Auto Detect Box ── */
.auto-detect-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    transition: all 0.25s ease;
}
.auto-detect-box:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}
.detect-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    border: 2px dashed rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    margin-bottom: 10px;
}
.detect-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}
.detect-btn:active { transform: scale(0.97); }
.success-text {
    color: #10b981;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.6;
    margin-top: 8px;
}

/* ── Buttons ── */
.btn-group {
    display: flex;
    gap: 14px;
    margin-top: 8px;
}
.next-btn,
.prev-btn,
.boost-btn {
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    border-radius: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}
.next-btn {
    background: var(--text-main);
    color: var(--bg-body);
    margin-top: 6px;
}
.next-btn:active { transform: scale(0.96); }

.prev-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    flex: 0 0 auto;
    padding: 15px 20px;
}
.prev-btn:active { transform: scale(0.96); }

.boost-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.boost-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* ── Scanner / Radar ── */
.text-center { text-align: center; }
#scan-section { padding: 52px 20px; }
.scanner-ring {
    width: 88px; height: 88px;
    margin: 0 auto 24px;
    border: 4px solid rgba(16, 185, 129, 0.12);
    border-top-color: #10b981;
    border-right-color: #10b981;
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.68, -0.55, 0.26, 1.55) infinite,
               glow 2s ease-in-out infinite alternate;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow {
    from { box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
    to   { box-shadow: 0 0 30px rgba(16, 185, 129, 0.6); }
}
#scan-text {
    color: var(--text-main);
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 6px;
}
#scan-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 28px;
}
.progress-bar-container {
    width: 100%; max-width: 440px;
    margin: 0 auto 12px;
    height: 10px;
    background: var(--bg-body);
    border-radius: 20px;
    overflow: hidden;
}
.progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 20px;
    transition: width 0.15s linear;
    position: relative; overflow: hidden;
}
.progress-fill::after {
    content: '';
    position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    animation: shimmer 1s infinite linear;
}
@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.scan-percent {
    color: #10b981;
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0;
}

/* ── Result Header Card ── */
.result-header-card { padding: 24px; }
.result-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.result-check-icon {
    font-size: 44px;
    color: #10b981;
    flex-shrink: 0;
}
.result-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 4px;
}
.result-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
}
.result-meta strong { color: var(--text-main); font-weight: 800; }
.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Badge Tags ── */
.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-tag.gaming {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}
.badge-tag.flagship {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}
.badge-tag.thermal-warn {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.3);
}
.badge-tag.thermal-safe {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}
.badge-tag.network-good {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}
.badge-tag.network-poor {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Card Title ── */
.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title i { color: #10b981; font-size: 22px; }

/* ── Gaming Score Card ── */
.score-card { }
.score-display {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.score-circle-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}
.score-svg {
    width: 130px; height: 130px;
    transform: rotate(-90deg);
}
.score-bg-ring {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 10;
}
.score-ring {
    fill: none;
    stroke: #10b981;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.score-number-wrap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1;
}
.score-number {
    display: block;
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}
.score-max {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 2px;
}
.score-grade {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    color: #10b981;
    margin-top: 4px;
}
.score-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
}
.score-bar-item { display: flex; flex-direction: column; gap: 4px; }
.score-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    justify-content: space-between;
}
.score-bar-track {
    height: 7px;
    background: var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 0%;
    transition: width 1s ease 0.3s;
}

/* ── FPS Bars ── */
.fps-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.fps-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fps-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 70px;
    flex-shrink: 0;
}
.fps-track {
    flex: 1;
    height: 10px;
    background: var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}
.fps-fill {
    height: 100%;
    border-radius: 20px;
    width: 0%;
    transition: width 1s ease 0.5s;
}
.fps-fill.green  { background: linear-gradient(90deg, #10b981, #34d399); }
.fps-fill.blue   { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.fps-fill.yellow { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.fps-fill.red    { background: linear-gradient(90deg, #ef4444, #f87171); }
.fps-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    width: 52px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Dashboard Setting Cards ── */
.dashboard-card {
    border-left: 4px solid #10b981;
}
.dashboard-card .card-title i { color: #10b981; }

.setting-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.setting-item {
    background: var(--bg-body);
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--border-color);
}
.setting-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.setting-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}
.setting-value.highlight { color: #10b981; }
.setting-value.danger    { color: #ef4444; }
.setting-value.warning   { color: #f97316; }
.setting-value.blue      { color: #3b82f6; }

/* ── Pro Tips Card ── */
.pro-tips-card { border-left: 4px solid #f59e0b; }
.pro-tips-card .card-title i { color: #f59e0b; }
.tips-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 12px 14px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.tips-list li::before {
    content: '⚡';
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 1px;
}

/* ── Watermark ── */
.wm-watermark {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 10px;
    opacity: 0.6;
}

/* ── Action Buttons ── */
.action-buttons-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.action-btn {
    flex: 1;
    min-width: 100px;
    padding: 16px 12px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.action-btn:active { transform: scale(0.96); }

.download-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}
.download-btn:hover { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }

.share-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}
.share-btn:hover { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }

.reset-btn {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    flex: 0 0 auto;
    padding: 16px 20px;
}
.reset-btn:hover { background: var(--bg-body); border-color: var(--text-muted); }

/* ── Toast ── */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #10b981;
    color: white;
    padding: 13px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5000;
    white-space: nowrap;
}
.toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Info Modal ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content {
    background: var(--bg-surface);
    width: 100%; max-width: 420px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-height: 88vh;
    overflow-y: auto;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.hidden .modal-content { transform: translateY(30px); }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    border-radius: 24px 24px 0 0;
    z-index: 1;
}
.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}
.modal-body { padding: 20px 24px 24px; }
.info-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 500;
}
.info-list li i   { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.info-list li div { flex: 1; }
.info-list li strong { color: var(--text-main); }

/* ── Utilities ── */
.hidden { display: none !important; }
.slide-down { animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
    .game-card { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .setting-list { grid-template-columns: 1fr; }
    .wizard-header { flex-direction: column; text-align: center; gap: 10px; }
    .progress-tracker { max-width: 200px; margin: 0 auto; }
    .btn-group { flex-direction: column-reverse; gap: 10px; }
    .score-display { flex-direction: column; align-items: center; }
    .score-breakdown { width: 100%; }
    .action-buttons-group { flex-direction: column; }
    .action-btn { width: 100%; }
    .reset-btn { flex: 1; }
    .result-title { font-size: 1.25rem; }
    .badges-row { gap: 6px; }
}
@media (max-width: 380px) {
    .wizard-title-area h2 { font-size: 1.1rem; }
    .boost-btn, .next-btn { font-size: 0.9rem; padding: 13px 18px; }
}