/* ===========================================================
   MOBILE-OPTIMIZED RTS TOOLS CSS
   Enhanced with comprehensive responsive design
=========================================================== */

/* ===========================================================
   GLOBAL CSS VARIABLES FOR THEMES
=========================================================== */

:root {
    --bg: #050505;
    --text: #00ff7f;
    --panel-bg: #052a1b;
    --panel-bg-2: #020f08;
    --nav-bg: #000;
    --nav-border: #00ff7f;
    --accent: #00ff7f;
    --accent-soft: #afffd1;
    --secondary: #008f4f;
    --footer: #00aa66;
}

/* LIGHT THEME */
:root.theme-light {
    --bg: #e8efe9;
    --text: #004d2f;
    --panel-bg: #ffffff;
    --panel-bg-2: #e0e7e2;
    --nav-bg: #cfe4d3;
    --nav-border: #007a4a;
    --accent: #009a63;
    --accent-soft: #00cc85;
    --secondary: #007a4a;
    --footer: #005b37;
}

/* ===========================================================
   GLOBAL RESET
=========================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: monospace;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* MAIN WRAPPER */
.wrapper {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* CRT scanlines */
.crt-overlay {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,255,127,0.04),
        rgba(0,255,127,0.04) 1px,
        transparent 2px,
        transparent 3px
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
}

/* ===========================================================
   NAVBAR
=========================================================== */
.rts-nav {
    background: var(--nav-bg);
    border-bottom: 2px solid var(--nav-border);
    box-shadow: 0 0 18px var(--nav-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.rts-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    gap: 3rem;
    align-items: center;
}

/* LOGO */
.rts-logo {
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--accent);
    white-space: nowrap;
}

/* MAIN MENU (DESKTOP) */
.rts-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
    flex-wrap: wrap;
}

/* BURGER (HIDDEN BY DEFAULT, ONLY MOBILE) */
.rts-burger {
    display: none;
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 1.4rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* MENU ITEMS */
.rts-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--accent);
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
}

.rts-item:hover {
    color: var(--accent-soft);
    text-shadow: 0 0 10px var(--accent);
}

/* ACTIVE CATEGORY */
.rts-item.active {
    border-bottom: 2px solid var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

/* LOGIN/REGISTER BUTTONS */
.rts-auth-btn {
    font-size: 1.05rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.35rem 0.6rem;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
}

.rts-auth-btn:hover {
    background: var(--accent);
    color: #000;
}

/* THEME TOGGLE */
.theme-toggle {
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
}

.theme-toggle:hover {
    background: var(--accent);
    color: #000;
}

/* ===========================================================
   SLIDE-DOWN PANELS
=========================================================== */
.nav-panels {
    background: var(--panel-bg-2);
    border-bottom: 1px solid var(--secondary);
}

.nav-panel {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    border-top: 1px solid var(--secondary);
}

.nav-panel.open {
    display: block;
}

.nav-panel h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.3rem;
}

/* Nav Panel Content Layout */
.nav-panel-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-category h3 {
    margin: 0 0 1rem 0;
    color: var(--accent);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.nav-links a {
    font-size: 1rem;
    text-decoration: none;
    color: var(--accent-soft);
    transition: all 0.2s;
    padding: 0.3rem 0;
}

.nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
    padding-left: 0.5rem;
    text-shadow: 0 0 8px var(--accent);
}

/* ===========================================================
   WELCOME TITLE
=========================================================== */
.welcome-title {
    font-size: 1.3rem;
    text-shadow: 0 0 10px var(--accent);
    margin-bottom: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ===========================================================
   PANELS / CONTENT BLOCKS
=========================================================== */
.panel {
    background: radial-gradient(circle at top left, var(--panel-bg), var(--panel-bg-2));
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 
        0 4px 20px rgba(0, 255, 127, 0.08),
        inset 0 1px 0 rgba(0, 255, 127, 0.1);
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent) 20%, 
        var(--accent) 80%, 
        transparent
    );
    opacity: 0.3;
}

.panel > h2,
.panel > h3 {
    margin-top: 0;
    margin-bottom: 0.9rem;
    color: var(--accent);
    font-size: 1.1rem;
    text-shadow: 0 0 8px var(--accent);
    letter-spacing: 0.5px;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(0, 255, 127, 0.2);
}

/* Headings inside panels */
h1, h2, h3, h4 {
    color: var(--accent);
    word-wrap: break-word;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 0.8rem 0;
}

h2 {
    font-size: 1.2rem;
    margin: 0 0 0.7rem 0;
}

h3 {
    font-size: 1rem;
    margin: 0.8rem 0 0.5rem 0;
}

h4 {
    font-size: 0.95rem;
    margin: 0.6rem 0 0.4rem 0;
}

/* ===========================================================
   FORMS
=========================================================== */
.form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

label {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    display: block;
    color: var(--accent-soft);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: #000;
    color: var(--text);
    border: 1px solid var(--secondary);
    padding: 10px 12px;
    width: 100%;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    -webkit-appearance: none; /* Remove iOS styling */
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 127, 0.1);
    background: #020a06;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ===========================================================
   BUTTONS
=========================================================== */
.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 255, 127, 0.2);
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly */
}

.btn:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 127, 0.3);
}

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

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    min-height: 32px;
}

.btn-danger-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-height: 32px;
}

.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn-danger:hover {
    background: #ff6666;
}

/* ===========================================================
   ALERTS
=========================================================== */
.alert {
    padding: 0.8rem 1rem;
    border: 1px solid;
    margin: 0.5rem 0 1rem 0;
    font-size: 0.9rem;
    border-radius: 6px;
    word-wrap: break-word;
}

.alert-error {
    border-color: #ff3b3b;
    color: #ff8080;
    background: rgba(255, 68, 68, 0.1);
}

.alert-ok, .alert-success {
    border-color: var(--accent);
    color: var(--accent-soft);
    background: rgba(0, 255, 127, 0.1);
}

.alert-warning {
    border-color: #ffaa00;
    color: #ffbb33;
    background: rgba(255, 170, 0, 0.1);
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
    color: #ff6666;
}

/* ===========================================================
   TERMINAL-LIKE OUTPUT
=========================================================== */
.terminal-output {
    background: #000;
    border: 1px solid var(--secondary);
    padding: 0.8rem;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: 1rem;
    border-radius: 4px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    background: rgba(0, 255, 127, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: var(--accent);
    font-size: 0.85rem;
    word-wrap: break-word;
}

/* ===========================================================
   TABLES
=========================================================== */
.table, .data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    overflow-x: auto;
    display: block;
}

.table thead, .data-table thead {
    background: var(--panel-bg-2);
}

.table th, .data-table th {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    white-space: nowrap;
}

.table td, .data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(0, 255, 127, 0.1);
    word-wrap: break-word;
}

.table tbody tr:hover, .data-table tbody tr:hover {
    background: rgba(0, 255, 127, 0.05);
}

/* Table Container for Mobile Scroll */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

/* ===========================================================
   DASHBOARD STYLES
=========================================================== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.title {
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--accent-soft);
    margin-bottom: 2rem;
}

.accent {
    color: var(--accent);
    font-weight: bold;
}

/* Stats Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-box {
    background: var(--panel-bg-2);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--accent-soft);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.quick-actions .btn {
    margin: 0;
    padding: 0.8rem;
    font-size: 0.9rem;
}

/* Activity List */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.activity-list li {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(0, 255, 127, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.act-time {
    color: var(--accent-soft);
    font-size: 0.85rem;
    min-width: 140px;
}

.act-event {
    color: var(--accent);
    font-weight: bold;
    flex: 1;
    min-width: 150px;
}

.act-status {
    padding: 0.2rem 0.5rem;
    background: rgba(0, 255, 127, 0.2);
    border-radius: 3px;
    font-size: 0.8rem;
}

.act-path {
    font-size: 0.8rem;
    color: var(--accent-soft);
    font-family: monospace;
}

/* ===========================================================
   PROFILE PAGE STYLES
=========================================================== */
.profile-summary {
    background: var(--panel-bg-2);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.profile-summary p {
    margin: 0.5rem 0;
}

.description {
    color: var(--accent-soft);
    font-size: 1rem;
    margin: 1rem 0;
}

.api-keys-section,
.login-history-section,
.activity-section {
    margin: 2rem 0;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--accent-soft);
    font-style: italic;
}

.api-key-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.user-agent-cell {
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.status-active {
    color: var(--accent);
    font-weight: bold;
}

.status-inactive {
    color: #ff6666;
    font-weight: bold;
}

.status-code {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    background: rgba(0, 255, 127, 0.2);
}

.status-code.status-2 {
    background: rgba(0, 255, 127, 0.2);
    color: var(--accent);
}

.status-code.status-4,
.status-code.status-5 {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6666;
}

.danger-zone {
    margin: 3rem 0;
    padding: 1.5rem;
    border: 2px solid #ff4444;
    border-radius: 8px;
    background: rgba(255, 68, 68, 0.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--panel-bg);
    margin: auto;
    padding: 2rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

/* ===========================================================
   ADMIN STYLES
=========================================================== */
.admin-table {
    width: 100%;
    overflow-x: auto;
}

.admin-users-table {
    display: block;
    overflow-x: auto;
}

.admin-user-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.admin-user-controls input,
.admin-user-controls select {
    flex: 1;
    min-width: 150px;
}

.admin-username {
    cursor: pointer;
    color: var(--accent);
    text-decoration: underline;
}

.admin-username:hover {
    text-shadow: 0 0 10px var(--accent);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid var(--accent);
    background: rgba(0, 255, 127, 0.1);
    color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--accent);
    color: #000;
}

.action-btn.delete {
    border-color: #ff4444;
    color: #ff6666;
}

.action-btn.delete:hover {
    background: #ff4444;
    color: #fff;
}

/* Badges */
.badge-tier,
.badge-verified,
.badge-unverified,
.badge-admin,
.badge-user {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-verified,
.badge-admin {
    background: rgba(0, 255, 127, 0.2);
    color: var(--accent);
}

.badge-unverified,
.badge-user {
    background: rgba(128, 128, 128, 0.2);
    color: #999;
}

.admin-badge-verified,
.admin-badge-active {
    color: var(--accent);
    font-weight: bold;
}

.admin-badge-unverified,
.admin-badge-disabled {
    color: #ff6666;
}

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.admin-modal.hidden {
    display: none;
}

.admin-modal-content {
    background-color: var(--panel-bg);
    margin: 5% auto;
    padding: 2rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
}

.admin-modal-close {
    color: var(--accent);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.admin-modal-close:hover {
    color: var(--accent-soft);
}

/* API Keys Admin */
.admin-keys-create {
    margin: 2rem 0;
}

.admin-key-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.admin-key-form label {
    flex: 1;
    min-width: 200px;
}

.admin-key-user-select {
    width: 100%;
}

.admin-generate-btn {
    white-space: nowrap;
}

.admin-keys-table {
    margin-top: 2rem;
}

.admin-key-cell {
    font-family: monospace;
}

.admin-key {
    font-size: 0.8rem;
    word-wrap: break-word;
}

.admin-key-actions {
    white-space: nowrap;
}

.admin-action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border: 1px solid var(--accent);
    background: none;
    color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
    margin: 0 0.2rem;
}

.admin-action-btn:hover {
    background: var(--accent);
    color: #000;
}

.admin-action-delete {
    border-color: #ff4444;
    color: #ff6666;
}

.admin-action-delete:hover {
    background: #ff4444;
    color: #fff;
}

/* Health Check */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--panel-bg-2);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card.stat-highlight {
    border: 2px solid var(--accent);
    background: rgba(0, 255, 127, 0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    line-height: 1;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(0, 255, 127, 0.2);
    color: var(--accent);
}

.status-badge.status-success {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff7f;
}

.status-badge.status-error {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6666;
}

/* ===========================================================
   HTTP HEADERS CHECKER STYLES
=========================================================== */
.grade-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--panel-bg-2);
    border-radius: 10px;
    margin: 2rem 0;
    border: 2px solid var(--accent);
}

.grade-circle {
    min-width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid;
    border-radius: 50%;
    flex-shrink: 0;
}

.grade-a { border-color: #00ff7f; }
.grade-b { border-color: #66ff99; }
.grade-c { border-color: #ffaa00; }
.grade-d { border-color: #ff6666; }
.grade-f { border-color: #ff3333; }

.grade-letter {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

.grade-score {
    font-size: 1rem;
    opacity: 0.8;
}

.grade-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
}

.header-check {
    background: var(--panel-bg-2);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.header-check.header-present {
    border-left-color: var(--accent);
}

.header-check.header-missing {
    border-left-color: #ff6666;
    opacity: 0.7;
}

.header-check-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.header-check-title h4 {
    margin: 0;
    flex: 1;
}

.header-status-icon {
    font-size: 1.5rem;
}

.header-weight {
    font-size: 0.85rem;
    color: var(--accent-soft);
}

.header-description {
    color: var(--accent-soft);
    margin: 0.5rem 0;
}

.header-value {
    margin: 0.8rem 0;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.header-value code {
    font-size: 0.85rem;
    word-wrap: break-word;
}

.header-issues ul {
    margin: 0.5rem 0 0 1.5rem;
    color: #ff6666;
}

.header-missing-info {
    padding: 0.8rem;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 4px;
    margin: 0.8rem 0;
}

.header-example {
    margin-top: 1rem;
}

.header-example summary {
    cursor: pointer;
    color: var(--accent-soft);
    padding: 0.5rem;
}

.header-example code {
    display: block;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: #000;
    border-radius: 4px;
    overflow-x: auto;
}

.all-headers-section {
    margin: 2rem 0;
}

.all-headers-section summary {
    cursor: pointer;
    padding: 1rem;
    background: var(--panel-bg-2);
    border-radius: 6px;
}

.headers-table {
    margin-top: 1rem;
}

.error-box {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    padding: 1rem;
    border-radius: 6px;
    color: #ff6666;
    margin: 1rem 0;
}

/* ===========================================================
   LANDING PAGE STYLES
=========================================================== */
.landing-container {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.landing-title {
    font-size: 3rem;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent);
    margin-bottom: 1rem;
}

.landing-subtitle {
    font-size: 1.2rem;
    color: var(--accent-soft);
    margin: 1rem 0 2rem;
    line-height: 1.6;
}

.landing-button {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    font-size: 1.1rem;
    box-shadow: 0 0 15px var(--accent);
    margin: 0.5rem;
}

.landing-button:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.landing-button.secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.landing-button.secondary:hover {
    background: var(--accent);
    color: #000;
}

.landing-auth-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-footer {
    margin-top: 3rem;
    color: var(--accent-soft);
    font-size: 0.9rem;
}

/* Feature Section */
.feature-section {
    margin: 3rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: radial-gradient(circle, rgba(0,255,127,0.07), rgba(0,255,127,0.03));
    border: 1px solid var(--accent);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,255,127,0.15);
    text-align: center;
}

.feature-card h3 {
    margin-top: 0;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

/* Terminal Animation */
.terminal-showcase {
    margin: 3rem auto;
    max-width: 700px;
}

.terminal-anim {
    background: #000;
    padding: 1.5rem;
    border: 1px solid rgba(0,255,127,0.3);
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent-soft);
    min-height: 150px;
    box-shadow: inset 0 0 20px rgba(0,255,127,0.1);
}

/* Featured Tools */
.featured-tools {
    margin: 3rem auto 5rem;
    text-align: center;
}

.tools-title {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.tool-btn {
    background: rgba(0,255,127,0.1);
    border: 1px solid var(--accent);
    padding: 12px;
    text-decoration: none;
    color: var(--accent);
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-2px);
}

/* ===========================================================
   FLASH MESSAGES
=========================================================== */
.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: rgba(0, 255, 127, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.flash-error {
    background: rgba(255, 68, 68, 0.15);
    border-color: #ff4444;
    color: #ff6666;
}

.flash-warning {
    background: rgba(255, 170, 0, 0.15);
    border-color: #ffaa00;
    color: #ffbb33;
}

.flash-info {
    background: rgba(0, 170, 255, 0.15);
    border-color: #00aaff;
    color: #66ccff;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* ===========================================================
   FOOTER
=========================================================== */
.rts-footer {
    background: var(--nav-bg);
    border-top: 2px solid var(--nav-border);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: var(--accent-soft);
}

.rts-footer p {
    margin: 0.5rem 0;
}

.rts-footer a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 0.5rem;
}

.rts-footer a:hover {
    text-decoration: underline;
}

/* ===========================================================
   DOCUMENTATION PAGE
=========================================================== */
.docs-section {
    margin: 2.5rem 0;
}

.docs-tool {
    background: var(--panel-bg-2);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin: 1.5rem 0;
}

.docs-tool h4 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
}

.docs-tool h4 a {
    color: var(--accent);
    text-decoration: none;
}

.docs-tool h4 a:hover {
    text-decoration: underline;
}

.docs-tool p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.docs-tip {
    background: rgba(0, 255, 127, 0.1);
    border-left: 4px solid var(--accent);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.resources-section {
    background: rgba(0, 255, 127, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.resources-section h3 {
    margin-top: 0;
    color: var(--accent);
}

.resources-section ul {
    margin: 1rem 0 0 1.5rem;
}

.resources-section a {
    color: var(--accent);
    text-decoration: none;
}

.resources-section a:hover {
    text-decoration: underline;
}

/* ===========================================================
   DETAILS/SUMMARY ELEMENTS
=========================================================== */
details {
    margin: 1rem 0;
}

details summary {
    cursor: pointer;
    padding: 0.8rem;
    background: var(--panel-bg-2);
    border-radius: 6px;
    color: var(--accent);
    font-weight: bold;
}

details summary:hover {
    background: rgba(0, 255, 127, 0.1);
}

details[open] summary {
    margin-bottom: 1rem;
}

/* ===========================================================
   LISTS
=========================================================== */
.list {
    list-style: none;
    padding: 0;
}

.list li {
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--accent);
    margin: 0.5rem 0;
    background: var(--panel-bg-2);
    border-radius: 4px;
}

ul, ol {
    line-height: 1.8;
}

/* ===========================================================
   MISC UTILITY CLASSES
=========================================================== */
hr {
    border: none;
    border-top: 1px solid rgba(0, 255, 127, 0.2);
    margin: 2rem 0;
}

.note {
    font-size: 0.85rem;
    color: var(--accent-soft);
    font-style: italic;
    margin: 1rem 0;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--accent-soft);
    font-style: italic;
}

.status-open {
    color: var(--accent);
    font-weight: bold;
}

.service-name {
    color: var(--accent-soft);
    font-style: italic;
}

/* ===========================================================
   MOBILE RESPONSIVE BREAKPOINTS
=========================================================== */

/* Tablets and small laptops (768px - 1024px) */
@media (max-width: 1024px) {
    .wrapper {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
    
    .rts-nav-inner {
        padding: 1rem 1.5rem;
        gap: 2rem;
    }
    
    .nav-panel-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .grade-container {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .grade-circle {
        margin: 0 auto;
    }
}

/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }
    
    .wrapper {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    /* NAVBAR MOBILE */
    .rts-nav-inner {
        padding: 0.8rem 1rem;
        gap: 1rem;
    }
    
    .rts-logo {
        font-size: 1.1rem;
    }
    
    .rts-burger {
        display: block;
        margin-left: auto;
    }
    
    .rts-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 2px solid var(--nav-border);
        gap: 1rem;
        margin-left: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
    
    .rts-menu.mobile-open {
        display: flex;
    }
    
    .rts-item,
    .rts-auth-btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .theme-toggle {
        width: 100%;
    }
    
    /* DROPDOWN PANELS MOBILE */
    .nav-panel {
        padding: 1rem;
    }
    
    .nav-panel-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav-category h3 {
        font-size: 1rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem 0;
    }
    
    /* PANELS */
    .panel {
        padding: 1rem;
        border-radius: 8px;
        margin: 1rem 0;
    }
    
    .panel > h2,
    .panel > h3 {
        font-size: 1rem;
    }
    
    /* FORMS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    /* TABLES */
    .table, .data-table {
        font-size: 0.8rem;
        display: block;
    }
    
    .table thead, .data-table thead {
        display: none; /* Hide headers on mobile */
    }
    
    .table tbody, .data-table tbody {
        display: block;
    }
    
    .table tr, .data-table tr {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--accent);
        margin-bottom: 1rem;
        padding: 0.8rem;
        border-radius: 6px;
        background: var(--panel-bg-2);
    }
    
    .table td, .data-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem;
        border: none;
    }
    
    .table td::before, .data-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--accent);
        margin-right: 1rem;
    }
    
    /* Alternative: Keep table scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* DASHBOARD */
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-box {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .quick-actions .btn {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* ACTIVITY LIST */
    .activity-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .act-time {
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .act-event {
        min-width: auto;
    }
    
    /* PROFILE */
    .profile-summary {
        padding: 1rem;
    }
    
    .api-key-display {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-agent-cell {
        max-width: 100%;
        font-size: 0.75rem;
    }
    
    /* ADMIN */
    .admin-user-controls {
        flex-direction: column;
    }
    
    .admin-user-controls input,
    .admin-user-controls select {
        width: 100%;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .admin-key-form {
        flex-direction: column;
    }
    
    .admin-key-form label {
        width: 100%;
    }
    
    .admin-generate-btn {
        width: 100%;
    }
    
    /* HEADERS CHECKER */
    .grade-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .grade-circle {
        min-width: 100px;
        height: 100px;
    }
    
    .grade-letter {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .header-check {
        padding: 1rem;
    }
    
    .header-check-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .header-value code {
        font-size: 0.75rem;
        word-break: break-all;
    }
    
    /* LANDING PAGE */
    .landing-container {
        padding: 2rem 1rem;
    }
    
    .landing-title {
        font-size: 2rem;
    }
    
    .landing-subtitle {
        font-size: 1rem;
    }
    
    .landing-button {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .landing-auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.2rem;
    }
    
    .terminal-anim {
        padding: 1rem;
        font-size: 0.75rem;
        min-height: 100px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* FLASH MESSAGES */
    .flash-container {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .flash {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    /* MODAL */
    .modal-content,
    .admin-modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 10% auto;
    }
    
    /* FOOTER */
    .rts-footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .rts-footer a {
        display: inline-block;
        margin: 0.3rem;
    }
    
    /* DOCS PAGE */
    .docs-tool {
        padding: 1rem;
    }
    
    .docs-tool code {
        font-size: 0.8rem;
        word-break: break-all;
    }
    
    /* TERMINAL OUTPUT */
    .terminal-output {
        font-size: 0.75rem;
        padding: 0.6rem;
    }
    
    /* HEADINGS */
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 0.95rem;
    }
    
    h4 {
        font-size: 0.9rem;
    }
}

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
    body {
        font-size: 0.85rem;
    }
    
    .rts-logo {
        font-size: 1rem;
    }
    
    .panel {
        padding: 0.8rem;
        margin: 0.8rem 0;
    }
    
    .landing-title {
        font-size: 1.8rem;
    }
    
    .landing-subtitle {
        font-size: 0.95rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-circle {
        min-width: 80px;
        height: 80px;
    }
    
    .grade-letter {
        font-size: 2rem;
    }
    
    .grade-score {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Landscape orientation fixes */
@media (max-height: 600px) and (orientation: landscape) {
    .modal-content,
    .admin-modal-content {
        margin: 2% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .landing-container {
        padding: 1rem;
    }
    
    .landing-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
}

/* Print styles */
@media print {
    .rts-nav,
    .rts-burger,
    .nav-panels,
    .flash-container,
    .rts-footer,
    .btn,
    .theme-toggle {
        display: none;
    }
    
    .wrapper {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .panel {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .panel {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .crt-overlay {
        display: none;
    }
}

/* Dark mode support (respects system preference) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* ===========================================================
   END OF MOBILE-OPTIMIZED CSS
=========================================================== */