:root {
    --text-color-primary: #fff;
    --text-color-secondary: #ccc;
    --text-color-tertiary: #999;
    --background-color-primary: #0c0c0f;
    --surface-color-primary: #202125;
    --surface-color-secondary: #15161a;
    --surface-color-hover: #a2a2a6;
    --text-color-primary-hover: #202020;
    --text-color-secondary-hover: #444;

    font-size: 17px;
}

body {
    user-select: none;
    -webkit-user-select: none;
    background-color: var(--background-color-primary);
    color: var(--text-color-primary);
    font-family: Arial;

    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 100vh;
    position: relative;

}

.background-div {
    position: fixed;
    /* Fix the div to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    align-items: start;

    /* Place it behind other content */

    /* Example: solid color */
    /* background-image: url('your-image.jpg'); /* Example: background image */
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
    /* background-position: center center; */
}

.content {
    position: relative;
    /* Ensure content appears above the background */
    z-index: 1;
    /* Place it above the background div */
    padding: 20px;
    color: #333;
}

input:focus {
    outline: none;
}

a {
    color: var(--text-color-secondary);
}

a:active,
a:focus {
    outline: 0;
    border: none;
}


.btn {
    padding: 1rem 2rem;
    text-align: center;
    text-decoration: none;
    /* display: inline-block; */
    margin: 0.2rem;
    cursor: pointer;
    line-height: 2.5rem;
    min-width: 5rem;
    border-radius: 1.25rem;
    width: 20%;
    background-color: var(--surface-color-primary);
    border: none;
    color: var(--text-color-primary);
    font-size: 1.3rem;
    transition: background-color 0.25s ease;
    box-sizing: border-box;
    opacity: 0.65;
    z-index: 999;
}

.btn:hover {
    background-color: var(--surface-color-hover);
    color: var(--text-color-primary-hover);
}


#main-content {
    position: relative;
    box-sizing: border-box;
}

#main-content>div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    box-sizing: border-box;
    display: flex;
}

#payloads-view {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    column-gap: 1.4rem;
    row-gap: 1.2rem;
    padding: 0 2rem 2rem 2rem;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
    align-content: start;
}

#payloads-view .btn {
    width: 100% !important;
}

.payload-btn-title {
    line-height: 1.7rem;
    font-weight: bolder;
    font-size: 1.3rem;
    padding: 0;
    margin: 0 0 0.7rem 0;
    overflow-wrap: anywhere;
}

.button-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 8.6rem;
}

.payload-autoload-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    line-height: 1.2rem;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-color-secondary);
}

.payload-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    border: 1px solid var(--surface-color-hover);
    border-radius: 0.45rem;
    background: var(--surface-color-secondary);
    color: var(--text-color-primary);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-sizing: border-box;
}

.payload-control-button:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.payload-control-button:hover {
    background: #f2f2f2;
    color: var(--text-color-primary-hover);
}

.payload-auto-button {
    min-width: 8rem;
    padding: 0 0.8rem;
}

.payload-auto-button.active {
    background: #167a3a;
    border-color: #66ff66;
    color: #ffffff;
}

.payload-delay-panel {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.payload-delay-step {
    width: 2.8rem;
    padding: 0;
    font-size: 1.4rem;
}

.payload-delay-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    min-height: 2.4rem;
    border: 1px solid var(--surface-color-hover);
    border-radius: 0.45rem;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-color-primary);
    box-sizing: border-box;
}

.payload-save-status {
    min-width: 4.8rem;
    color: #66ff66;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: left;
}

.payload-save-status.show {
    opacity: 1;
}

.payload-btn-description {
    color: var(--text-color-secondary);
    margin: 0;
    padding: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    line-height: 2rem;
    font-size: 1rem;
    max-width: 100%;
}

.btn:hover p.payload-btn-description {
    color: var(--text-color-secondary-hover);
}

.payload-btn-info {
    color: var(--text-color-tertiary);
    margin: 0;
    padding: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.5rem;
    font-size: 0.9rem;
    font-weight: normal;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.btn:hover p.payload-btn-info {
    color: var(--text-color-tertiary-hover);
}


.selected {
    opacity: 1 !important;
    pointer-events: auto !important;
}


#toast-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--surface-color-secondary);
    color: var(--text-color-primary);
    padding: 20px 25px;
    border-radius: 1rem;
    margin-top: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    min-width: 300px;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-100%);
}


.l2-redirect-box {
    background: #bdc0c2;
    border-radius: 5px;
    padding: 0.2rem 0.4rem;
    text-align: center;
    position: relative;
    display: flex;
    color: #4e4e4e;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}


.log {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    unicode-bidi: embed;
    font-family: monospace;
    white-space: pre;
    color: var(--text-color-primary);
    background-color: inherit;
    border: var(--surface-color-primary) 1px solid;
    border-radius: 5px;
    padding: 8px;
    margin: 8px;
    box-sizing: border-box;
    overflow-y: auto;
    font-size: initial;

}


.LOG-DEBUG {
    color: #bbddbb;
}

.LOG-INFO {
    color: #bbbbbb;
}

.LOG-LOG {
    color: #ffffff;
}

.LOG-WARN {
    color: #ffcc00;
}

.LOG-ERROR {
    color: #ff6666;
}

.LOG-SUCCESS {
    color: #66ff66;
}

.log:active,
.log:focus {
    outline: 0;
    border: none;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

.flex-direction-column {
    flex-direction: column;
}

.flex-direction-row {
    flex-direction: row;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.fw-bold {
    font-weight: 800;
}

.text-secondary {
    color: var(--text-color-secondary);
    margin: 0;
    padding: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.8rem
}

.top-0 {
    top: 0;
}

.bottom-0 {
    bottom: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.m-1 {
    margin: 0.25rem !important;
}

.m-2 {
    margin: 0.5rem !important;
}

.m-3 {
    margin: 1rem !important;
}

.m-4 {
    margin: 1.5rem !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}

.ml-4 {
    margin-left: 1.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.mr-4 {
    margin-right: 1.5rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.progress-container {
    display: flex;
    gap: 20px;
    font-size: 48px;

}

.symbol {
    width: 18%;
    height: 25%;
    opacity: 0.2;
    transition: opacity 0.4s, transform 0.4s;
}

.active {
    opacity: 1;
    transform: scale(1.3) rotate(360deg);
}

/* Colors for symbols */
.triangle {
    color: #00cc66;
}

.circle {
    color: #ff004c;
}

.cross {
    color: #0099ff;
}

.square {
    color: #ff66cc;
}

.hover-box {
    position: fixed;
    top: 20px;
    right: 20px;
    background: darkblue;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: normal;
    /* ✅ allow wrapping */
    min-width: 29%;
    text-align: center;
    max-width: 29%;
}

.hover-box.show {
    opacity: 1;
}

.op25 {
    opacity: 0.1 !important;
    /* Initial state: completely transparent */
    transition: opacity 1.5s ease-in-out;
    /* Transition over 0.5 seconds with ease-in-out timing */
}
