/* ============================================
   FlickZZ Resources — Utility Page Stylesheet
   Daily Minecraft Tools
   ============================================ */

.util-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + var(--ann-offset) + 3rem) 1.5rem 4rem;
}

/* ---------- HERO ---------- */
.util-hero { text-align: center; margin-bottom: 2.5rem; }
.util-hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--primary-light); color: var(--primary);
    border: 1px solid rgba(99,102,241,.25);
    padding: .4rem 1rem; border-radius: 999px;
    font-size: .85rem; font-weight: 600; margin-bottom: 1rem;
}
.util-hero-badge i { color: var(--warning); }
.util-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.util-hero p { color: var(--text-muted); max-width: 620px; margin: .75rem auto 0; }

/* ---------- TOOL GRID ---------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: .85rem;
    margin-bottom: 2rem;
}
.tool-card {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    background: var(--bg-card); 
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.15rem .75rem;
    text-align: center; transition: all 0.2s ease;
    min-height: 132px; justify-content: center;
    cursor: pointer;
    color: var(--text);
}
.tool-card small { color: var(--text-dim); font-size: .74rem; line-height: 1.3; }
.tool-card strong { font-size: .92rem; font-weight: 700; }

/* 🔥 ULTIMATE FIX: Hover pe black nahi, original background hi rahe */
button.tool-card:hover,
.tool-card:hover {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    background-image: none !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow) !important;
    color: var(--text) !important;
}

.tool-card.active {
    border-color: var(--primary);
    background: linear-gradient(160deg, var(--primary-light), transparent 70%);
    box-shadow: var(--shadow-glow);
}
.tool-ic {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: var(--ic, var(--primary));
    background: color-mix(in srgb, var(--ic, var(--primary)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--ic, var(--primary)) 30%, transparent);
}

/* ---------- PANELS ---------- */
.tool-workspace { min-height: 300px; }
.tool-panel {
    display: none;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 1.75rem;
    box-shadow: var(--shadow);
    animation: toolFadeIn .3s ease;
}
.tool-panel.active { display: block; }
@keyframes toolFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 1.5rem; }
.panel-head h2 { font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; gap: .6rem; }
.panel-head h2 i { color: var(--primary); }
.panel-head p { color: var(--text-muted); font-size: .9rem; margin-top: .35rem; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.panel-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; align-content: start; }

/* ---------- FORM FIELDS ---------- */
.fld { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.fld > span, .fld-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.fld input:not([type=checkbox]):not([type=range]):not([type=color]),
.fld select, .fld textarea, .code-in {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .6rem .8rem;
    color: var(--text); font-size: .9rem; font-family: inherit;
    width: 100%; transition: var(--transition);
}
.fld textarea, .code-in { font-family: 'JetBrains Mono', monospace; font-size: .82rem; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .code-in:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.fld.chk { flex-direction: row; align-items: center; gap: .55rem; padding: .45rem 0; }
.fld.chk input { width: 17px; height: 17px; accent-color: var(--primary); }
.fld.chk span { color: var(--text); font-weight: 500; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.inline-add { display: flex; gap: .5rem; }
.range-fld input[type=range] { accent-color: var(--primary); width: 100%; }
.color-pick { width: 46px; height: 40px; padding: 2px; border-radius: var(--radius-sm); background: var(--bg-elevated); border: 1px solid var(--border); }
.hint { font-size: .8rem; color: var(--text-dim); display: flex; gap: .45rem; align-items: center; }
.hint i { color: var(--accent); }
.hint code, .panel-head code { background: var(--bg-elevated); padding: .1rem .4rem; border-radius: 5px; font-size: .8em; color: var(--accent); }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- CODE OUTPUT ---------- */
.code-out {
    background: #0b0b12; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
    font-family: 'JetBrains Mono', monospace; font-size: .8rem;
    color: #c9d1e3; white-space: pre-wrap; word-break: break-word;
    min-height: 120px; max-height: 380px; overflow: auto; margin: 0;
}
[data-theme="light"] .code-out { background: #f6f7fb; color: #1e293b; }
.code-out.tall { min-height: 320px; }

/* ---------- MOTD ---------- */
.motd-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.motd-toolbar button {
    width: 30px; height: 30px; border-radius: 7px; font-size: .78rem; font-weight: 800;
    border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text);
    transition: var(--transition); display: inline-flex; align-items: center; justify-content: center;
}
.motd-toolbar button:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.mc-serverlist {
    display: flex; gap: .9rem; align-items: flex-start;
    background: linear-gradient(180deg, #3b3b3b, #262626);
    border: 1px solid #555; border-radius: 6px; padding: .8rem .9rem;
    font-family: 'JetBrains Mono', monospace;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.mc-sl-icon { width: 52px; height: 52px; border-radius: 4px; image-rendering: pixelated; }
.mc-sl-body { flex: 1; min-width: 0; }
.mc-sl-top { display: flex; justify-content: space-between; color: #aaa; font-size: .95rem; margin-bottom: .15rem; }
.mc-sl-players { color: #888; }
.mc-sl-motd { color: #aaa; font-size: .95rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.mc-sl-ping { color: #4ade80; font-size: .8rem; }

/* ---------- PERMISSION / PACK LISTS ---------- */
.perm-list {
    display: flex; flex-direction: column; gap: .4rem;
    max-height: 300px; overflow: auto; padding: .5rem;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
}
.perm-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: var(--radius-sm); font-size: .85rem; transition: background var(--transition); }
.perm-item:hover { background: var(--bg-hover); }
.perm-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.perm-item code { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--accent); }
.perm-item .perm-desc { color: var(--text-dim); font-size: .75rem; margin-left: auto; text-align: right; }
.pack-list { max-height: 420px; }
.perm-item .pack-name { font-weight: 600; }

/* ---------- COLOR GRID ---------- */
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.color-chip {
    display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
    text-align: left;
}
.color-chip:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.color-chip .sw { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.35); flex-shrink: 0; }
.color-chip .meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.color-chip .meta b { font-size: .78rem; }
.color-chip .meta code { font-size: .72rem; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.cc-preview {
    background: #2b2b2b; border: 1px solid #444; border-radius: var(--radius-sm);
    padding: .9rem 1rem; font-family: 'JetBrains Mono', monospace; font-size: 1rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,.5); min-height: 54px; word-break: break-word;
}

/* ---------- DROP ZONE / ICON ---------- */
.drop-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    border: 2px dashed var(--border-hover); border-radius: var(--radius-lg);
    padding: 2.5rem 1rem; cursor: pointer; text-align: center; transition: var(--transition);
    color: var(--text-muted);
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--primary); background: var(--primary-light); }
.drop-zone i { font-size: 1.8rem; color: var(--primary); }
.drop-zone small { color: var(--text-dim); }
.icon-preview-col { align-items: center; }
.icon-preview-box {
    width: 128px; height: 128px; border-radius: var(--radius);
    background: var(--bg-elevated); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.icon-preview-box img { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 8px; }

/* ---------- STATUS / UUID RESULTS ---------- */
.status-bar { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.status-bar input {
    flex: 1; background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .65rem .9rem; color: var(--text);
    font-size: .95rem; font-family: inherit;
}
.status-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.status-result { display: flex; flex-direction: column; gap: 1rem; }
.status-card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem 1.4rem;
    display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap;
}
.status-badge { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .85rem; padding: .3rem .8rem; border-radius: 999px; }
.status-badge.online { background: rgba(16,185,129,.12); color: var(--success); }
.status-badge.offline { background: rgba(239,68,68,.12); color: var(--danger); }
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .9rem; flex: 1; min-width: 220px; }
.status-meta .m { display: flex; flex-direction: column; }
.status-meta .m span { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.status-meta .m b { font-size: 1rem; }
.status-motd { width: 100%; background: #2b2b2b; border: 1px solid #444; border-radius: var(--radius-sm); padding: .7rem .9rem; font-family: 'JetBrains Mono', monospace; font-size: .85rem; color: #aaa; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }
.uuid-avatar { width: 84px; height: 84px; border-radius: var(--radius); image-rendering: pixelated; border: 1px solid var(--border); }

/* ---------- YAML RESULT ---------- */
.yaml-result { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; min-height: 120px; }
.yaml-ok { color: var(--success); font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.yaml-err { color: var(--danger); font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.yaml-detail { margin-top: .6rem; font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--text-muted); white-space: pre-wrap; }
.yaml-stats { display: flex; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
.yaml-stats span { font-size: .8rem; color: var(--text-dim); background: var(--bg-hover); padding: .25rem .65rem; border-radius: 999px; }

/* ---------- RAM CARDS ---------- */
.ram-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.ram-card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.1rem 1.2rem;
}
.ram-card .rc-ic { font-size: 1.2rem; color: var(--primary); margin-bottom: .4rem; }
.ram-card b { font-size: 1.3rem; display: block; }
.ram-card span { font-size: .78rem; color: var(--text-dim); }
.ram-card.hero-card { grid-column: 1 / -1; background: linear-gradient(135deg, var(--primary-light), transparent); border-color: rgba(99,102,241,.35); }
.ram-card.hero-card b { font-size: 1.9rem; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ram-note { grid-column: 1 / -1; font-size: .8rem; color: var(--text-dim); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
    .panel-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .tool-panel { padding: 1.2rem; }
}
@media (max-width: 560px) {
    .util-main { padding-left: 1rem; padding-right: 1rem; }
    .tool-panel { padding: 1rem; border-radius: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .fld-row { grid-template-columns: 1fr; }
    .status-bar { flex-direction: column; }
    .ram-cards { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .tool-card { min-height: 118px; padding: 1rem .65rem; }
    .tool-card strong { font-size: .85rem; }
    .tool-card small { font-size: .7rem; }
    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; }
    .mc-serverlist { padding: .75rem; gap: .65rem; }
    .mc-sl-icon { width: 42px; height: 42px; }
    .mc-sl-top { flex-direction: column; align-items: flex-start; gap: .15rem; }
    .mc-sl-top span { white-space: normal; }
    .mc-sl-motd { font-size: .82rem; line-height: 1.28; }
    .code-out.tall { min-height: 240px; }
}

@media (max-width: 400px) {
    .tool-grid { grid-template-columns: 1fr; }
    .panel-head h2 { font-size: 1.15rem; }
    .mc-sl-name, .mc-sl-players { font-size: .86rem; }
    .mc-sl-motd { font-size: .76rem; }
}
