:root {
    --bg-color: #f0f0f0;
    --primary: #5a5ce6;
    --yellow: #ffcc00;
    --light-purple: #f3e8ff;
    --black: #000000;
    --white: #ffffff;
    --border-radius: 8px;
    --brutal-shadow: 5px 5px 0px var(--black);
    --border: 3px solid var(--black);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(var(--black) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--black);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 450px;
    background: transparent;
    display: flex;
    flex-direction: column;
    padding: 20px 15px 80px 15px;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Typography & Badges */
h1.main-title {
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #ccc;
}

.server-badge {
    background: var(--black);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    width: fit-content;
    margin: 0 auto 10px auto;
}

.badge {
    background: var(--black);
    color: var(--white);
    padding: 3px 6px;
    font-size: 10px;
    border-radius: 4px;
    margin-left: 5px;
}
.badge.bad {
    background: #ff4d4d;
}

/* Brutal Cards */
.brutal-card {
    background: var(--white);
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--brutal-shadow);
    padding: 15px;
    margin-bottom: 20px;
}

.brutal-card-inner {
    border: 2px solid var(--black);
    padding: 15px;
    background: var(--white);
    border-radius: 6px;
    margin-top: 10px;
}

/* TOGGLE SWITCH CSS */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f44336;
  transition: .4s;
  border: 2px solid #000;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border: 2px solid #000;
  transition: .4s;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* User Card */
.user-card {
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-card .label {
    display: block;
    font-size: 10px;
    opacity: 0.8;
}
.user-card .user-type {
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.user-card .user-type::before {
    content: "👤";
}
.user-card .user-id {
    background: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Balance Card */
.balance-card .section-label {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}
.coin-display {
    background: var(--yellow);
    border: var(--border);
    box-shadow: 4px 4px 0px var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px !important;
    max-width: 200px;
    margin: 0 auto;
}
.coin-icon { font-size: 24px; }
.coin-amount { font-size: 26px; font-weight: 900; }
.coin-text { font-size: 14px; font-weight: bold; }

/* Forms & Inputs */
.input-group {
    margin-bottom: 20px;
}
.section-label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 8px;
}
.brutal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--black);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}
.brutal-input:focus {
    border-color: var(--primary);
}

.brutal-btn {
    width: 100%;
    padding: 15px;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: 4px 4px 0px var(--black);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-align: center;
}
.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--black);
}
.submit-btn { background: var(--primary); color: var(--white); }
.purple-btn { background: #9d4edd; color: var(--white); }
.black-btn { background: var(--black); color: var(--yellow); }

/* Emoji Preview */
.preview-box {
    margin-bottom: 5px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}
.preview-label {
    font-size: 10px;
    text-align: center;
    color: #999;
    margin-bottom: 10px;
    display: block;
}
.emoji-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.emoji-box {
    background: var(--yellow);
    border: 2px solid var(--black);
    box-shadow: 2px 2px 0px var(--black);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 4px;
}
#preview-placeholder {
    color: #bbb;
    font-size: 14px;
    text-align: center;
    width: 100%;
}
.emoji-counter {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    margin-bottom: 20px;
}

/* Scrape Preview */
#channel-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border: 1px dotted #ccc;
    border-radius: 4px;
    max-width: 100%;
}
#channel-preview img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
#channel-preview-name {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: calc(100% - 50px);
}

/* Views Navigation */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Redeem & VIP Area */
.redeem-card {
    background: var(--light-purple);
    text-align: center;
}
.vip-card {
    background: var(--yellow);
    text-align: center;
}
.icon-circle {
    background: var(--primary);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: var(--border);
    box-shadow: 4px 4px 0px var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px auto;
}
.black-circle { background: var(--black); }
.redeem-card h2, .vip-card h2 { margin-bottom: 5px; }
.redeem-card p, .vip-card p { font-size: 12px; font-weight: bold; opacity: 0.8; margin-bottom: 20px; }
.secure-text { margin-top: 20px !important; font-size: 10px !important; }

/* Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    z-index: 10;
    background: var(--bg-color);
    padding: 10px;
    border-top: 2px solid var(--black);
}
.nav-item {
    flex: 1;
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 2px 0px var(--black);
    cursor: pointer;
    transition: all 0.1s;
}
.nav-item.active {
    background: var(--primary);
    color: var(--white);
}
.nav-item:nth-child(3).active {
    background: var(--yellow);
    color: var(--black);
}
.nav-item:active { transform: translate(2px,2px); box-shadow: 1px 1px 0px var(--black); }
.nav-item .icon { font-size: 20px; }
.nav-item .text { font-size: 10px; font-weight: bold; margin-top: 5px; }

/* Footer */
.footer-secure {
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
    color: #666;
}
.footer-secure span {
    display: inline-block;
    padding: 2px 8px;
    background: #e0f7ea;
    color: #2e7d32;
    border: 1px solid #2e7d32;
    border-radius: 12px;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Offline Overlay */
#offline-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}
.offline-card {
    text-align: center;
    background: var(--yellow);
    max-width: 400px;
}
.bounce-anim { animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* Admin Panel */
.admin-dashboard { margin-top: 20px; }
.admin-dashboard h2 { margin-bottom: 15px; }
.warning-bg { background-color: var(--yellow); }
.admin-req-card {
    background: #fff;
    border: 1px solid #000;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}
.req-actions { display: flex; gap: 10px; margin-top: 10px; }
.btn-done { background: #4caf50; color: white; border: 1px solid #000; padding: 5px 10px; cursor: pointer; border-radius: 4px; box-shadow: 2px 2px 0 #000; font-weight:bold; }
.btn-cancel { background: #f44336; color: white; border: 1px solid #000; padding: 5px 10px; cursor: pointer; border-radius: 4px; box-shadow: 2px 2px 0 #000; font-weight:bold; }
.queue-box { text-align: center; font-size: 12px; background: #e3f2fd; }

/* Order Key */
.coin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}
.coin-opt {
    width: auto;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    background: white;
    box-shadow: 2px 2px 0px var(--black);
}
.coin-opt.selected {
    background: var(--black);
    color: var(--yellow);
}
