:root {
    --red: #ff0000;
    --red-hover: #cc0000;
    --red-glow: rgba(255, 0, 0, 0.4);
    --bg-dark: #000000;
    --bg-card: rgba(17, 17, 17, 0.95);
    --bg-card-hover: #161616;
    --border: #333333;
    --border-glow: #ff0000;
    --text-primary: #ffffff;
    --text-muted: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.95)), url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* TOP NAVBAR */
.cs-header-nav {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(12, 12, 12, 0.9);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.cs-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cs-header-logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--red);
}

.cs-nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-nav-link {
    color: #aaa;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 6px;
    background: #181818;
    border: 1px solid #2a2a2a;
}

.cs-nav-link:hover {
    color: #fff;
    border-color: var(--red);
    background: #222;
}

.cs-nav-link.primary {
    color: #ff4d4d;
    border-color: rgba(255,0,0,0.4);
}

/* TITLE BANNER */
.cs-title-banner {
    text-align: center;
    margin-bottom: 25px;
    width: 100%;
    max-width: 900px;
}

.cs-title-banner h1 {
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,0,0,0.5);
    margin-bottom: 6px;
}

.cs-title-banner p {
    color: #888;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* MAIN TOOL BOX */
.tool-box {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
    transition: border-color 0.3s;
}

.tool-box:hover {
    border-color: #444;
}

.text-area-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

label {
    font-size: 12px;
    font-weight: 700;
    color: #ff4d4d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.in, input[type="text"], input[type="number"], input[type="file"], select, textarea {
    background: #0a0a0a;
    border: 1px solid #383838;
    border-radius: 8px;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    width: 100%;
}

.in:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 12px var(--red-glow);
}

input[type="range"] {
    accent-color: var(--red);
    cursor: pointer;
    background: transparent;
}

textarea {
    min-height: 120px;
    font-family: monospace;
    resize: vertical;
}

.row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.row > * {
    flex: 1;
}

/* BUTTONS */
.btn {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn:hover {
    background: var(--red-hover);
    box-shadow: 0 0 25px var(--red-glow);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn.big {
    padding: 24px 30px;
    font-size: 20px;
    width: 100%;
    border-radius: 12px;
}

/* STATS & DISPLAYS */
.disp {
    background: #050505;
    border: 2px solid #222;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    font-size: 38px;
    font-weight: 900;
    color: var(--red);
    font-family: monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255,0,0,0.4);
}

.stats-bar {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    background: #0a0a0a;
    border: 1px solid #252525;
    border-radius: 10px;
    padding: 16px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat .num {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    font-family: monospace;
}

.stat .lbl {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.lim {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.lim:hover {
    background: #141414;
    border-color: #333;
}

.lim span {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 13px;
}

.lim b {
    color: #ddd;
    font-family: monospace;
    font-size: 13px;
}

.out {
    background: #0a0a0a;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 16px;
    color: #ccc;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.note {
    font-size: 11px;
    color: #777;
    font-style: italic;
    line-height: 1.4;
}

.pv, canvas, video, audio {
    max-width: 100%;
    border-radius: 8px;
}

/* SECRET ADMIN PIXEL IN BOTTOM LEFT CORNER */
#adminTriggerPixel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 12px;
    height: 12px;
    opacity: 0;
    z-index: 9999999;
    cursor: pointer;
}

/* ADMIN MODAL */
#adminModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 1000000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.admin-box {
    background: #111;
    border: 2px solid var(--red);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    padding: 30px;
    box-shadow: 0 0 40px rgba(255,0,0,0.5);
    color: #fff;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-box h2 {
    color: var(--red);
    font-size: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.admin-tab {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #aaa;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.admin-tab.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.admin-input {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.admin-btn {
    width: 100%;
    background: var(--red);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 5px;
}

.admin-btn:hover {
    background: var(--red-hover);
}

.admin-btn-secondary {
    background: #333;
    margin-top: 8px;
}

.admin-btn-secondary:hover {
    background: #444;
}

/* FOOTER */
.cs-footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    font-size: 11px;
    color: #666;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cs-footer a {
    color: #888;
    text-decoration: none;
}

.cs-footer a:hover {
    color: var(--red);
}

/* COMPREHENSIVE RESPONSIVE STYLES FOR ALL TOOLS */
@media (max-width: 768px) {
    body {
        padding: 14px 10px;
    }
    .cs-header-nav {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding: 12px;
        margin-bottom: 20px;
    }
    .cs-nav-links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .cs-nav-link {
        font-size: 11px;
        padding: 6px 10px;
    }
    .cs-title-banner h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }
    .cs-title-banner p {
        font-size: 13px;
    }
    .cs-tool-container, .tool-container, .card, .panel, .main-box {
        padding: 18px 14px !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .grid, .grid-2, .grid-3, .form-row, .row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    button, .btn, input[type="button"], input[type="submit"] {
        min-height: 44px;
    }
    .cs-footer {
        flex-direction: column;
        gap: 8px;
    }
}