* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: #000;
    color: white;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    width: 100%;
    max-width: 1400px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    overflow: hidden;
    flex-wrap: wrap;
    margin: 0 auto;
}

.content {
    flex: 1;
    padding: 20px;
}

.new-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title {
    text-align: center;
    margin-bottom: 40px;
}

.main-heading {
    font-size: 64px;
    color: #00fff7;
    text-shadow: 0 0 5px #00fff7, 0 0 11px #00fff7;
}

.glow-wrap {
    margin-top: 10px;
}

.glow-title {
    display: inline-block;
    font-size: 58px;
    color: #ff00bf;
    text-shadow: 0 0 5px #ff00bf, 0 0 11px #ff00bf;
    animation: flicker 3s infinite ease-in-out;
}

@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.7;
    }
}

.buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

button.btn {
    font-size: 20px;
    padding: 14px 30px;
    cursor: pointer;
    border-radius: 12px;
    width: 260px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    border: 3px solid;
    background-color: transparent;
    transition: transform 0.25s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

button.btn i {
    font-size: 24px;
}

.btn.single {
    border-color: #ff4d00;
    color: #ff4d00;
}

.btn.single:hover {
    background-color: #ff4d00;
    color: white;
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 12px #ff4d00, 0 0 24px #ff4d00;
}

.btn.multi {
    border-color: #005eff;
    color: #005eff;
}

.btn.multi:hover {
    background-color: #005eff;
    color: white;
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 12px #005eff, 0 0 24px #005eff;
}

.btn.leader {
    border-color: #00aaff;
    color: #00aaff;
}

.btn.leader:hover {
    background-color: #00aaff;
    color: white;
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 12px #00aaff, 0 0 24px #00aaff;
}

.preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.neon-board {
    position: relative;
    display: grid;
    width: 400px;
    height: 400px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    background-color: transparent;
    border: none;
    z-index: 1;
    position: relative;
    color: white;
}

.cell:nth-child(1),
.cell:nth-child(2),
.cell:nth-child(4),
.cell:nth-child(5),
.cell:nth-child(7),
.cell:nth-child(8) {
    border-right: 3px solid red;
}

.cell:nth-child(4),
.cell:nth-child(5),
.cell:nth-child(6),
.cell:nth-child(7),
.cell:nth-child(8),
.cell:nth-child(9) {
    border-top: 3px solid red;
}

.cell.x span {
    color: orange;
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.7);
}

.cell.o span {
    color: #00f6ff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

/* ====================== */
/* WIN LINE + POLYGON     */
/* ====================== */
.win-line {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 20px;
    width: 0;
    transform: translate(-50%, -50%) rotate(-45deg);
    z-index: 9999;
    transition: width 1s ease-in-out;
    pointer-events: none;
}

.win-line.animated {
    width: 133%;
}

.glow-polygon {
    position: absolute;
    inset: 0;
    background: transparent;
    clip-path: polygon(0% 50%,
            10% 40%,
            50% 35%,
            90% 40%,
            100% 50%,
            90% 60%,
            50% 65%,
            10% 60%);
    animation: flickerLine 3s infinite ease-in-out;
}

.glow-polygon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #00fff7;
    clip-path: inherit;
    border-radius: 12px;
    filter:
        drop-shadow(0 0 6px #00fff7) drop-shadow(0 0 12px #00fff7);
    animation: flickerLine 3s infinite ease-in-out;
}

@keyframes flickerLine {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.7;
    }
}

/* Entrance Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    animation: slideFromLeft 1.4s ease forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    animation: slideFromRight 1.4s ease forwards;
}

@keyframes slideFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Footer Container */
.footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background: #000;
    overflow: hidden;
}

.footer-rainbow {
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(90deg,
            #ff0000,
            #ff7f00,
            #ffff00,
            #00ff00,
            #0000ff,
            #4b0082,
            #8f00ff,
            #4b0082,
            #0000ff,
            #00ff00,
            #ffff00,
            #ff7f00,
            #ff0000);
    background-size: 800% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    animation: rainbowLoop 20s ease-in-out infinite alternate;
}

@keyframes rainbowLoop {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* keep as-is */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.4s ease-in-out;
}

.popup-overlay.hidden {
    display: none;
}

/* Popup Container - Glassmorphism */
.popup-container {
    position: relative;
    max-width: 360px;
    width: 90%;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 2rem;
    background-color: rgba(0, 255, 204, 0.05);
    border: 1px solid #00ffcc;
    box-shadow:
        0 0 25px rgba(0, 255, 204, 0.2),
        inset 0 0 15px rgba(0, 255, 204, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1001;

    /* Optional blur if you want it extra glassy */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(12px);
    animation: slideIn 0.5s ease-out;
}


/* Popup Header */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popup-header h2 {
    font-size: 1.4rem;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc;
}

.popup-close {
    font-size: 2.1rem;
    padding-left: 29.5px;
    color: #00ffcc;
    cursor: pointer;
}

.popup-close:hover {
    color: #de4040;
}

/* Popup Body */
.popup-body input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    background: transparent;
    color: #00ffcc;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 0 4px #00ffcc;
}

.input-group label {
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
    /* or your desired label color */
    display: inline-block;
    margin-bottom: 5.5px;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.5px;
}

.input-group label .required {
    font-size: 1rem;
    margin-left: 1px;
}


/* Buttons */
.popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.submit-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 1rem;
    border-radius: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 4px #00ff00;
}


.cancel-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border: 2px solid #cc0000;
    color: #cc0000;
    font-size: 1rem;
    border-radius: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 4px #cc0000;
}

.submit-btn:hover {
    background: #00cc00;
    /* Darker green for better text contrast */
    color: #ffffff;
    /* Keep white text */
    box-shadow: 0 0 15px #00cc00;
}


.cancel-btn:hover {
    background: #cc0000;
    color: #ffffff;
    box-shadow: 0 0 15px #cc0000;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(-40px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        background-color: rgba(0, 0, 0, 0);
    }

    to {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Error Message Styling */
.error-message {
    opacity: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    color: rgb(251, 43, 43);
    font-size: 0.8rem;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 7px;
    text-align: left;
    width: 100%;
    font-family: 'Orbitron', sans-serif;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.error-message.show {
    opacity: 1;
    max-height: 50px;
    /* allows message to expand */
    margin-top: -10px;
    margin-bottom: 12px;
}


/* Leaderboard Modal */
.leaderboard-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.4s ease-in-out;
}

.leaderboard-modal.lb-hidden {
    display: none;
}

/* Container (glassmorphism) */
.lb-modal-container {
    position: relative;
    max-width: 800px;
    width: 95%;
    padding: 2rem;
    border-radius: 1.5rem;
    background-color: rgba(0, 255, 204, 0.05);
    border: 1px solid #00ffcc;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.2), inset 0 0 15px rgba(0, 255, 204, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(12px);
    animation: slideIn 0.5s ease-out;
    overflow: hidden;
}

/* Close Button */
.lb-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #00ffcc;
    cursor: pointer;
}

.lb-close-btn:hover {
    color: #de4040;
}

/* Modal Header */
.lb-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.lb-modal-title {
    font-size: 1.8rem;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc;
}

/* Tabs */
.lb-tabs {
    display: flex;
    width: 100%;
    border-bottom: 2px solid #00ffcc;
    margin-bottom: 1.5rem;

}

.lb-tab {
    flex: 1;
    padding: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    border: none;
    outline: none;
    z-index: 2;
    position: relative;
    border-bottom: 3px solid transparent;
    /* Reserve space */
    background: transparent;
    font-size: 1rem;
    color: #00ffcc;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease, border-bottom 0.3s ease;

}

.lb-tab-active {
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 3px #00ffcc;
}

.lb-tab,
.lb-tab-active {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    backface-visibility: hidden;
    transform: translateZ(0);
}



.lb-tab:hover {
    color: #ffffff;
    background: rgba(0, 255, 204, 0.08);
}

.lb-tab-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.lb-tab-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: #00ffcc;
    transform: translateX(0%);
    transition: transform 0.3s ease;
    will-change: transform;
    z-index: 1;
}

.lb-tab,
.lb-tab-underline {
    box-sizing: border-box;
}


/* Leaderboard Section */
.lb-leaderboard-section {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: rgba(0, 255, 204, 0.03);
    color: #ffffff;
}

/* Table Header and Rows - Flex layout */
.lb-table-header,
.lb-table-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 204, 0.15);
}

.lb-table-header {
    background: rgba(0, 255, 204, 0.05);
    color: #00ffcc;
    font-size: 1rem;
    padding: 1.3535rem;
    text-shadow: 0 0 3px #00ffcc;
    border-bottom: 1px solid #00ffcc;
    position: sticky;
    top: 0;
    z-index: 2;
}



.row-rank,
.lb-table-row .row-rank {
    width: 80px;
    min-width: 80px;
    text-align: center;
}

.row-player,
.lb-table-row .row-player {
    flex: 1;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-score,
.lb-table-row .row-score {
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.lb-table-row:hover {
    background: rgba(0, 255, 204, 0.05);
}


/* Match History Section */
.lb-match-history-section {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(0, 255, 204, 0.03);
    color: #ffffff;

}

.lb-match-history-header {
    padding: 0.8657rem;
    border-bottom: 1px solid #00ffcc;
    color: #00ffcc;
    font-weight: bold;
    text-shadow: 0 0 3px #00ffcc;
}

.lb-match-history-header h2 {
    font-size: 1.25rem;
}

.lb-match-history-header p {
    font-size: 0.9rem;
}

/* Main row layout */
.lb-match-history-body .lb-match-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.1);
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

/* Left block: Player 1 + score + result */
.lb-match-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 150px;
}

.lb-player {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
}

.lb-score {
    font-size: 0.85rem;
    color: #aaa;
    text-align: left;
    opacity: 0.85;

}

.lb-result {
    display: inline-block;
    margin-top: 0rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.lb-result.win {
    background: rgba(0, 255, 100, 0.15);
    color: #00ff66;
    box-shadow: 0 0 4px #00ff66;
}

.lb-result.loss {
    background: rgba(255, 0, 0, 0.15);
    color: #ff3333;
    box-shadow: 0 0 4px #ff3333;
}

.lb-result.draw {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    box-shadow: 0 0 4px #ffa500;
}

/* Center: VS + Player 2 */
.lb-match-center {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.lb-vs {
    color: #aaa;
    font-size: 0.9rem;
}

.lb-player2 {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
}

/* Date aligned to far right */
.lb-date {
    font-size: 0.85rem;
    color: #aaa;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
    align-self: center;
}

/* Hover effect */
.lb-match-row:hover {
    background: rgba(0, 255, 204, 0.05);
}

/* Footer */
.lb-modal-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 1.2rem;
}


/* Animations */
@keyframes slideIn {
    from {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        background-color: rgba(0, 0, 0, 0);
    }

    to {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Scrollable Content */
#matchHistoryBody {
    max-height: 262px;
    overflow-y: scroll;
}

/* Hidden utilities */
.lb-hidden {
    display: none !important;
}

/* Wrapper for scrollable leaderboard body */
.lb-table-scrollable {
    max-height: calc(5 * 52.8px);
    /* ~5 rows */
    overflow-y: scroll;
}

.lb-table-scrollable::-webkit-scrollbar,
#matchHistoryBody::-webkit-scrollbar {
    width: 5px;
}

.lb-table-scrollable::-webkit-scrollbar-thumb,
#matchHistoryBody::-webkit-scrollbar-thumb {
    background-color: #00ffcc66;
    border-radius: 8px;
}

.lb-table-scrollable::-webkit-scrollbar-track,
#matchHistoryBody::-webkit-scrollbar-track {
    background: transparent;
}


body.no-scroll {
    overflow: hidden;
}

.no-data {
    text-align: center;
    padding: 1rem;
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}

/* ===== Responsive for mid-size screens (1050px to 881px) ===== */
@media (max-width: 1050px) and (min-width: 881px) {
    .title {
        margin-bottom: 37.89px;
    }


    .container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 35px;
        padding: 20px;
    }

    .content {
        width: 45%;
        padding: 20px;
        text-align: center;
    }

    .preview {
        width: 45%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-heading {
        font-size: 56px;
    }

    .glow-title {
        font-size: 48px;
    }

    .buttons {
        margin-top: 28.56px;
    }

    .buttons button.btn {
        font-size: 20px;
        width: 260px;
        padding: 14px 26px;
        gap: 10px;
        /* spacing between icon and text */
        border-width: 2.83px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 19.5px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 340px;
        height: 340px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2.628px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2.628px solid red;
    }


    .cell {
        font-size: 56px;
    }

    .win-line.animated {
        width: 133%;
        height: 16.8px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 40px 6.3px;
        padding-top: 40px;
        padding-bottom: 27px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.93rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Responsive for screens 880px and below ===== */
@media (max-width: 880px) {
    .title {
        margin-bottom: 29px;
    }

    .container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        padding: 20px;
    }

    .content {
        width: 100%;
        text-align: center;
    }

    .preview {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0;
    }

    .main-heading {
        font-size: 50.5px;
    }

    .glow-title {
        font-size: 43.7px;
    }



    .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 26.8px;

    }

    .buttons button.btn {
        font-size: 17.9px;
        width: 230px;
        padding: 12px 22px;
        gap: 9px;
        /* spacing between icon and text */
        border-width: 2.7px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 19.29px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 300px;
        height: 300px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2.47px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2.47px solid red;
    }

    .cell {
        font-size: 49.5px;
    }


    .win-line.animated {
        width: 133%;
        height: 15.3px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 39px 6.3px;
        padding-top: 39px;
        padding-bottom: 29px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.895rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Responsive for tablets and small phones ===== */
@media (max-width: 768px) {
    .title {
        margin-bottom: 24px;
    }


    .main-heading {
        font-size: 45.56px;
    }

    .glow-title {
        font-size: 39.6px;
    }

    .buttons {
        margin-top: 25px;
    }


    .buttons button.btn {
        font-size: 15.5px;
        width: 209px;
        padding: 10px 20px;
        gap: 6.3px;
        /* spacing between icon and text */
        border-width: 2.64px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 19px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 259px;
        height: 259px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2.35px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2.35px solid red;
    }

    .cell {
        font-size: 42.35px;
    }

    .win-line.animated {
        width: 133%;
        height: 14px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 38px 6.3px;
        padding-top: 38px;
        padding-bottom: 30px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.885rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Very small phones ===== */
@media (max-width: 480px) {
    body {
        padding: 17px 5.5px;
    }

    .container {
        padding: 10px;
    }

    .title {
        margin-bottom: 18px;
    }

    .main-heading {
        font-size: 37.5px;
    }

    .glow-title {
        font-size: 33px;
    }

    .buttons {
        margin-top: 24.5px;
    }

    .buttons button.btn {
        font-size: 14.3px;
        width: 189px;
        padding: 8px 18px;
        gap: 6px;
        /* spacing between icon and text */
        border-width: 2.42px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 18.46px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;


    }

    .neon-board {
        width: 220px;
        height: 220px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2.24px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2.24px solid red;
    }

    .cell {
        font-size: 35px;
    }

    .win-line.animated {
        width: 133%;
        height: 12.45px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 37px 6.25px;
        padding-top: 37px;
        padding-bottom: 30px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.85rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}


/* ===== Ultra-small devices (below 340px) ===== */
@media (max-width: 340px) {
    body {
        padding: 16.467px 4.367px;
    }

    .container {
        padding: 9.467px;
    }

    .title {
        margin-bottom: 17.47px;
    }

    .main-heading {
        font-size: 30.7px;
    }

    .glow-title {
        font-size: 28px;
    }

    .buttons {
        margin-top: 23px;
    }

    .buttons button.btn {
        font-size: 13px;
        width: 167px;
        padding: 6px 14px;
        gap: 6px;
        /* spacing between icon and text */
        border-width: 2.3px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 16.5px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 187.67px;
        height: 187.67px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2.15px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2.15px solid red;
    }


    .cell {
        font-size: 30px;
    }

    .win-line.animated {
        width: 136%;
        height: 10px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 33px 6.25px;
        padding-top: 33px;
        padding-bottom: 28px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.84rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Extremely small devices (below 285px) ===== */
@media (max-width: 285px) and (min-width: 260px) {
    body {
        padding: 16.367px 4.267px;
    }

    .container {
        padding: 9.367px;
    }

    .title {
        margin-bottom: 17.37px;
    }

    .main-heading {
        font-size: 27.7px;
    }

    .glow-title {
        font-size: 24.67px;
    }

    .buttons {
        margin-top: 22px;
    }


    .buttons button.btn {
        font-size: 11.5px;
        width: 149px;
        height: 33.35px;
        padding: 4px 10px;
        gap: 6px;
        /* spacing between icon and text */
        border-width: 2.25px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 15.5px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 155.7px;
        height: 155.7px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 2px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 2px solid red;
    }

    .cell {
        font-size: 23px;
    }

    .win-line.animated {
        width: 135%;
        height: 8.2px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 31px 6.25px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.84rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 260px) ===== */
@media (max-width: 260px) and (min-width: 235px) {
    body {
        padding: 16.267px 4.167px;
    }

    .container {
        padding: 9.267px;
    }

    .title {
        margin-bottom: 17.27px;
    }

    .main-heading {
        font-size: 25.67px;
    }

    .glow-title {
        font-size: 23.67px;
    }

    .buttons {
        margin-top: 21.51px;
    }


    .buttons button.btn {
        font-size: 10.6px;
        width: 134.5px;
        height: 30px;
        padding: 2px 6px;
        gap: 6px;
        /* spacing between icon and text */
        border-width: 2px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 13.6px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 137.7px;
        height: 137.7px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.95px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.95px solid red;
    }


    .cell {
        font-size: 18.67px;
    }

    .win-line.animated {
        width: 136%;
        height: 6.87px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 6.2px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.832rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 235px) ===== */
@media (max-width: 235px) and (min-width: 200px) {
    body {
        padding: 16.267px 4.167px;
    }

    .container {
        padding: 9.267px;
    }

    .title {
        margin-bottom: 17.27px;
    }

    .main-heading {
        font-size: 24.67px;
    }

    .glow-title {
        font-size: 22px;
    }

    .buttons {
        margin-top: 21px;
    }

    .buttons button.btn {
        font-size: 10.1px;
        width: 127.2px;
        height: 26.45px;
        padding: 2px 4.9px;
        gap: 4.3px;
        /* spacing between icon and text */
        border-width: 1.95px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 13px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 124.73px;
        height: 124.73px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.90px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.90px solid red;
    }



    .cell {
        font-size: 19.67px;
    }

    .win-line.animated {
        width: 135%;
        height: 6.6px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 6px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.82rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== More Minimal screens (below 200px) ===== */
@media (max-width: 200px) and (min-width: 190px) {
    body {
        padding: 16.25px 4.15px;
    }

    .container {
        padding: 9.25px;
    }

    .title {
        margin-bottom: 17.267px;
    }

    .main-heading {
        font-size: 23.67px;
    }

    .glow-title {
        font-size: 21px;
    }

    .buttons {
        margin-top: 21px;
    }


    .buttons button.btn {
        font-size: 9.24px;
        width: 118px;
        height: 25.3px;
        padding: 1.2px 4px;
        gap: 4px;
        /* spacing between icon and text */
        border-width: 1.93px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 11.54px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 116.8px;
        height: 116.8px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.85px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.85px solid red;
    }


    .cell {
        font-size: 19px;
    }

    .win-line.animated {
        width: 135%;
        height: 6.2px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 5.5px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.77rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 190px) ===== */
@media (max-width: 190px) and (min-width: 180px) {
    body {
        padding: 16px 4px;
    }

    .container {
        padding: 9.15px;
    }

    .title {
        margin-bottom: 17.167px;
    }

    .main-heading {
        font-size: 22.68px;
    }

    .glow-title {
        font-size: 20.46px;
    }

    .buttons {
        margin-top: 20.5px;
    }

    .buttons button.btn {
        font-size: 8.86px;
        width: 116.3px;
        height: 24.42px;
        padding: 1px 3px;
        gap: 3.89px;
        /* spacing between icon and text */
        border-width: 1.92px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 11.3px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 115.67px;
        height: 115.67px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.75px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.75px solid red;
    }


    .cell {
        font-size: 18px;
    }

    .win-line.animated {
        width: 135%;
        height: 6px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 5px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.73rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 180px) ===== */
@media (max-width:180px) {

    body {
        padding: 16px 4px;
    }

    .container {
        padding: 9.15px;
    }

    .title {
        margin-bottom: 17.167px;
    }

    .main-heading {
        font-size: 21.56px;
    }

    .glow-title {
        font-size: 19.45px;
    }

    .buttons {
        margin-top: 20.35px;
    }

    .buttons button.btn {
        font-size: 8.56px;
        width: 109px;
        height: 24.3px;
        padding: 0.8px 2px;
        gap: 3.2px;
        /* spacing between icon and text */
        border-width: 1.835px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 10.367px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 114.35px;
        height: 114.35px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.65px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.65px solid red;
    }


    .cell {
        font-size: 17.5px;
    }

    .win-line.animated {
        width: 135%;
        height: 5.5px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 5px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.767rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 165px) ===== */
@media (max-width:165px) {

    body {
        padding: 16px 4px;
    }

    .container {
        padding: 9.15px;
    }

    .title {
        margin-bottom: 17.16px;
    }

    .main-heading {
        font-size: 21px;
    }

    .glow-title {
        font-size: 19px;
    }

    .buttons {
        margin-top: 20px;
    }

    .buttons button.btn {
        font-size: 8.5px;
        width: 108px;
        height: 23px;
        padding: 0.8px 2px;
        gap: 3.2px;
        /* spacing between icon and text */
        border-width: 1.835px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 10px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .neon-board {
        width: 113px;
        height: 113px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.65px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.65px solid red;
    }


    .cell {
        font-size: 17px;
    }

    .win-line.animated {
        width: 135%;
        height: 5.3px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 5px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.75rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* ===== Minimal screens (below 150px) ===== */
@media (max-width:150px) {

    body {
        padding: 16px 4px;
    }

    .container {
        padding: 3px;

    }

    .title {
        margin-bottom: 17px;
    }

    .main-heading {
        font-size: 20px;
    }

    .glow-title {
        font-size: 18px;
    }

    .buttons {
        margin-top: 20px;
    }

    .buttons button.btn {
        font-size: 8.2px;
        width: 105px;
        height: 22px;
        padding: 0.8px 2px;
        gap: 3.2px;
        /* spacing between icon and text */
        border-width: 1.835px;
        border-style: solid;

    }

    .buttons button.btn i {
        font-size: 10px;
        /* consistent icon size */
        vertical-align: middle;
        line-height: 1;

    }

    .preview {
        align-items: flex-start;

    }

    .neon-board {
        width: 110px;
        height: 110px;
    }

    .cell:nth-child(1),
    .cell:nth-child(2),
    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(7),
    .cell:nth-child(8) {
        border-right: 1.65px solid red;
    }

    .cell:nth-child(4),
    .cell:nth-child(5),
    .cell:nth-child(6),
    .cell:nth-child(7),
    .cell:nth-child(8),
    .cell:nth-child(9) {
        border-top: 1.65px solid red;
    }


    .cell {
        font-size: 16px;
    }

    .win-line.animated {
        width: 135%;
        height: 5.1px;
        transform: translate(-50%, -50%) rotate(-45deg);
        transform-origin: center;
    }

    .footer {
        overflow: visible;
        padding: 30px 5px;
        /* tighter padding for very small screens */
    }

    .footer-rainbow {
        white-space: normal;
        word-break: break-word;
        font-size: 0.73rem;
        /* smaller font for small screens */
        background-size: 400% 100%;
        /* reduce gradient scale */
    }
}

/* Responsiveness for Pop up Form Container */
@media (max-width: 750px) {
    .popup-container {
        width: 90%;
        max-width: 320px;
        padding: 1.3rem;
        border-radius: 1.3rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-bottom: 16px;
    }

    .popup-header h2 {
        font-size: 1.3rem;
    }

    .popup-close {
        font-size: 1.9rem;
        padding-left: 17px;
    }

    .popup-body input {
        font-size: 0.95rem;
        padding: 10px;
        margin-bottom: 14px;
    }

    .popup-actions {
        gap: 16px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.9rem;
        padding: 8px;
        border-radius: 1rem;
    }
}

@media (max-width: 480px) {
    .popup-container {
        width: 90%;
        max-width: 285px;
        padding: 1.15rem;
        border-radius: 1.15rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-bottom: 14px;
    }

    .popup-header h2 {
        font-size: 1.1rem;
    }

    .popup-close {
        font-size: 1.6rem;
        padding-left: 22.5px;
    }

    .popup-body input {
        font-size: 0.9rem;
        padding: 8px;
        margin-bottom: 13px;
    }

    .popup-actions {
        gap: 14px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.83rem;
        padding: 6px;
        border-radius: 0.9rem;
    }
}

@media (max-width: 360px) {
    .popup-container {
        width: 90%;
        max-width: 243px;
        padding: 1.1rem;
        border-radius: 1rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-bottom: 12px;
    }


    .popup-header h2 {
        font-size: 0.95rem;
    }

    .popup-close {
        font-size: 1.3rem;
        padding-left: 16px;
    }

    .popup-body input {
        font-size: 0.85rem;
        padding: 6px;
        margin-bottom: 13px;
    }

    .popup-actions {
        gap: 13px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.77rem;
        padding: 5px;
        border-radius: 0.8rem;
    }
}

@media (max-width: 315px) {
    .popup-container {
        width: 90%;
        max-width: 210px;
        padding: 1rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-bottom: 10px;
    }


    .popup-header h2 {
        font-size: 0.76rem;
    }

    .popup-close {
        font-size: 1.12rem;
        padding-left: 19px;
    }

    .popup-body input {
        font-size: 0.65rem;
        border: 1.8px solid #00ffcc;
        padding: 4.5px;
        padding-left: 5.75px;
        margin-bottom: 13px;
    }


    .popup-actions {
        gap: 12px;
    }


    .submit-btn,
    .cancel-btn {
        font-size: 0.69rem;
        padding: 4px;
        padding-bottom: 4.19px;
        border-radius: 0.7rem;
    }

    .submit-btn {
        border: 1.8px solid #00ff00;
    }

    .cancel-btn {
        border: 1.8px solid #cc0000;
    }
}



@media (max-width: 275px) {
    .popup-container {
        width: 90%;
        max-width: 186px;
        padding: 0.9rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-top: 1px;
        margin-bottom: 7px;
    }

    .popup-header h2 {
        font-size: 0.69rem;
    }

    .popup-close {
        font-size: 1.04rem;
        padding-left: 15px;
    }

    .popup-body input {
        font-size: 0.6rem;
        border: 1.75px solid #00ffcc;
        padding: 4px;
        padding-left: 5.5px;
        margin-bottom: 10px;
    }

    .popup-actions {
        gap: 11px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.63rem;
        padding: 3.9px;
        padding-bottom: 4.3px;
        border-radius: 0.7rem;
    }

    .submit-btn {
        border: 1.75px solid #00ff00;
    }

    .cancel-btn {
        border: 1.75px solid #cc0000;
    }
}

@media (max-width: 235px) {
    .popup-container {
        width: 90%;
        max-width: 165px;
        padding: 0.7rem;
        gap: 0.2rem;
    }

    .popup-header {
        margin-top: 1px;
        margin-bottom: 5.5px;
    }

    .popup-header h2 {
        font-size: 0.62rem;
    }

    .popup-close {
        font-size: 1.01rem;
        padding-left: 14px;
    }

    .popup-body input {
        font-size: 0.57rem;
        border: 1.7px solid #00ffcc;
        padding: 3.5px;
        padding-left: 5.35px;
        margin-bottom: 9px;
    }

    .popup-actions {
        gap: 10px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.567rem;
        padding: 3.8px;
        padding-bottom: 4px;
        border-radius: 0.68rem;
    }

    .submit-btn {
        border: 1.7px solid #00ff00;
    }

    .cancel-btn {
        border: 1.7px solid #cc0000;
    }
}

@media (max-width: 200px) {
    .popup-container {
        width: 90%;
        max-width: 145px;
        padding: 0.63rem;
        gap: 0.15rem;
    }

    .popup-header {
        margin-top: 0.95px;
        margin-bottom: 4px;
    }

    .popup-header h2 {
        font-size: 0.56rem;
    }

    .popup-close {
        font-size: 0.93rem;
        padding-left: 7.9px;
    }

    .popup-body input {
        font-size: 0.54rem;
        border: 1.65px solid #00ffcc;
        padding: 3px;
        padding-left: 5.3px;
        margin-bottom: 8.3px;
    }

    .popup-actions {
        gap: 9px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.49rem;
        padding: 3.7px;
        padding-bottom: 3.85px;
        border-radius: 0.67rem;
    }

    .submit-btn {
        border: 1.65px solid #00ff00;
    }

    .cancel-btn {
        border: 1.65px solid #cc0000;
    }
}

@media (max-width: 180px) {
    .popup-container {
        width: 90%;
        max-width: 130px;
        padding: 0.58rem;
        gap: 0.1rem;
    }

    .popup-header {
        margin-top: 0.85px;
        margin-bottom: 3.2px;
    }

    .popup-header h2 {
        font-size: 0.514rem;
    }

    .popup-close {
        font-size: 0.87rem;
        padding-left: 6.6px;
    }

    .popup-body input {
        font-size: 0.51rem;
        border: 1.6px solid #00ffcc;
        padding: 2.8px;
        padding-left: 5.29px;
        margin-bottom: 7.6px;
    }

    .popup-actions {
        gap: 8px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.43rem;
        padding: 3.6px;
        padding-bottom: 3.75px;
        border-radius: 0.66rem;
    }

    .submit-btn {
        border: 1.6px solid #00ff00;
    }

    .cancel-btn {
        border: 1.6px solid #cc0000;
    }
}

@media (max-width: 165px) {
    .popup-container {
        width: 90%;
        max-width: 116px;
        padding: 0.56rem;
        gap: 0.08rem;
    }

    .popup-header {
        margin-top: 0.75px;
        margin-bottom: 2.6px;
    }

    .popup-header h2 {
        font-size: 0.45rem;
    }

    .popup-close {
        font-size: 0.75rem;
        padding-left: 5.6px;
    }

    .popup-body input {
        font-size: 0.48rem;
        border: 1.55px solid #00ffcc;
        padding: 2.65px;
        padding-left: 5.15px;
        margin-bottom: 6.5px;
    }

    .popup-actions {
        gap: 7px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.39rem;
        padding: 3.5px;
        padding-bottom: 3.65px;
        border-radius: 0.65rem;
    }

    .submit-btn {
        border: 1.55px solid #00ff00;
    }

    .cancel-btn {
        border: 1.55px solid #cc0000;
    }
}

@media (max-width: 150px) {
    .popup-container {
        width: 90%;
        max-width: 106.5px;
        padding: 0.56rem;
        gap: 0.065rem;
    }

    .popup-header {
        margin-top: 0.65px;
        margin-bottom: 2px;
    }

    .popup-header h2 {
        font-size: 0.42rem;
    }

    .popup-close {
        font-size: 0.7rem;
        padding-left: 4.1px;
    }

    .popup-body input {
        font-size: 0.43rem;
        border: 1.5px solid #00ffcc;
        padding: 2.53px;
        padding-left: 5.1px;
        margin-bottom: 5.6px;
    }

    .popup-actions {
        gap: 6px;
    }

    .submit-btn,
    .cancel-btn {
        font-size: 0.365rem;
        padding: 3.4px;
        padding-bottom: 3.55px;
        border-radius: 0.64rem;
    }

    .submit-btn {
        border: 1.5px solid #00ff00;
    }

    .cancel-btn {
        border: 1.5px solid #cc0000;
    }
}