/* Universal Reset & Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #121214;
    --card-bg: #1a1a1e;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --danger-color: #f43f5e;
    --border-color: #2e2e33;
    --btn-secondary: #3f3f46;
    --btn-secondary-hover: #52525b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Main Section Card */
section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

section h2 {
    color: var(--danger-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

section h3 {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
}

section h3:last-of-type {
    margin-bottom: 0;
}

section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

section p::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Custom Unordered List Styling */
.list-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-section li {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-main);
    font-family: monospace;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.list-section li:hover {
    background-color: #232329;
}

.list-section li:active {
    transform: scale(0.99);
}

/* Input & Button Container Group */
.input-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    max-width: 600px;
}

input[type="text"] {
    flex: 1;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Unified Button Architecture */
.btn, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn:hover, button:hover {
    background-color: var(--accent-hover);
}

/* Secondary Button Layout Theme Override */
.btn-secondary {
    background-color: var(--btn-secondary);
}

.btn-secondary:hover {
    background-color: var(--btn-secondary-hover);
}

/* Responsive Iframe Frame */
iframe {
    width: 100%;
    height: 650px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Lower Controls Alignment Grid */
.control-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Killswitch Modal & Overlay Layout Rules --- */

/* Popup Darkened Mask Screen Layer */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal Content Card Styling Layout */
.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: normal;
}

.modal-content p {
    padding-left: 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.modal-content p::before {
    content: none;
}

.modal-content input[type="file"] {
    width: 100%;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* absolute Screen Cover Layer Mask Display Engine */
#killswitchOverlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background-color: #000000; 
    z-index: 999999; 
    justify-content: center; 
    align-items: center;
}

#killswitchOverlay img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .input-group, .control-actions, .modal-buttons {
        flex-direction: column;
    }
    .btn, button {
        width: 100%;
    }
    iframe {
        height: 450px;
    }
}