@font-face {
    font-family: 'SuperCereal';
    src: url('/fonts/SuperCereal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html, body, #app {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    background: linear-gradient(-45deg, #ff0000, #b22222, #dc143c, #ff6347, #8b0000, #ff4500 );
    background-size: 400% 400%;
    animation: gradientRGB 60s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: SuperCereal,'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Mobile-specific body adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
}


@keyframes gradientRGB {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* === Splash Loader === */
.splash-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 2rem;
    padding: 20px;
    box-sizing: border-box;
}

.splash-title {
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(2.5rem, 10vw, 5rem);
    color: white;
    margin: 0;
    letter-spacing: 3px;
    text-shadow: 0 0 40px rgba(255, 80, 80, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
}


.splash-board {
    display: grid;
    grid-template-columns: repeat(3, clamp(60px, 15vw, 80px));
    grid-template-rows: repeat(3, clamp(60px, 15vw, 80px));
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    padding: 14px;
    border-radius: 20px;
}

.splash-cell {
    background: rgba(255, 234, 228, 0.92);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    user-select: none;
}

.splash-cell.splash-x > span { color: #1E90FF; }
.splash-cell.splash-o > span { color: #DC143C; }

@keyframes cellReveal {
    0%,  8%  { opacity: 0; transform: scale(0.5); }
    22%       { opacity: 1; transform: scale(1.18); }
    32%       { opacity: 1; transform: scale(1); }
    68%       { opacity: 1; transform: scale(1); }
    88%, 100% { opacity: 0; transform: scale(0.5); }
}

.splash-cell.d1 { animation: cellReveal 3.6s ease-in-out infinite 0.00s; }
.splash-cell.d2 { animation: cellReveal 3.6s ease-in-out infinite 0.36s; }
.splash-cell.d3 { animation: cellReveal 3.6s ease-in-out infinite 0.72s; }
.splash-cell.d4 { animation: cellReveal 3.6s ease-in-out infinite 1.08s; }
.splash-cell.d5 { animation: cellReveal 3.6s ease-in-out infinite 1.44s; }
.splash-cell.d6 { animation: cellReveal 3.6s ease-in-out infinite 1.80s; }
.splash-cell.d7 { animation: cellReveal 3.6s ease-in-out infinite 2.16s; }
.splash-cell.d8 { animation: cellReveal 3.6s ease-in-out infinite 2.52s; }
.splash-cell.d9 { animation: cellReveal 3.6s ease-in-out infinite 2.88s; }

.loading-progress-text {
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    letter-spacing: 1px;
    position: static;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10px;
    box-sizing: border-box;
}

.gameArea{
    width: 90vw;
    max-width: 1400px;
    min-height: 400px;
    height: auto;
    position: relative;
    background-color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 20px;
}

/* Large screen adjustments */
@media (min-width: 1200px) {
    .gameArea {
        width: 85vw;
        max-width: 1600px;
        padding: 30px;
    }
}

@media (min-width: 1920px) {
    .gameArea {
        width: 80vw;
        max-width: 1800px;
        padding: 40px;
    }
}

.card-body-align-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.connection-form {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    box-sizing: border-box;
}

/* Large screen form adjustments */
@media (min-width: 1200px) {
    .connection-form {
        max-width: 700px;
        padding: 15px;
    }
}

@media (min-width: 1920px) {
    .connection-form {
        max-width: 800px;
        padding: 20px;
    }
}


.header-area{
    justify-content: center;
    margin-bottom: 20px;
}

.instruction-header{
    display: flex;
    justify-content: center;
    padding: 5%;
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    text-align: center;
    word-wrap: break-word;
}

/* Large screen heading adjustments */
@media (min-width: 1200px) {
    .instruction-header {
        font-size: clamp(2rem, 3vw, 3.5rem);
        padding: 3%;
    }
}

@media (min-width: 1920px) {
    .instruction-header {
        font-size: clamp(2.5rem, 2.5vw, 4rem);
    }
}


.button-area {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Center content in rows containing buttons */
.row.button-row {
    justify-content: center;
    align-items: center;
}

/* Center button content */
.row.button-row > [class*="col-"] {
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-button {
    border-radius: 20px;
    background-color: #ff0000;
    border-color: #b22222;
    border: thin;
    color: white;
    min-width: 120px;
    width: auto;
    max-width: 300px;
    padding: 15px 20px;
    font-size: clamp(1rem, 2.5vw, 2rem);
    font-family: SuperCereal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #dc143c;
    transform: scale(1.05);
}

.submit-button:active {
    transform: scale(0.95);
}

/* Tablet/Medium screen button adjustments (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    .submit-button {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 16px 22px;
        font-size: clamp(1.1rem, 2vw, 1.4rem);
    }
}

/* Large screen button adjustments */
@media (min-width: 1200px) {
    .submit-button {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 18px 25px;
        font-size: clamp(1.2rem, 1.8vw, 2rem);
    }
}

@media (min-width: 1920px) {
    .submit-button {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 20px 30px;
        font-size: clamp(1.4rem, 1.5vw, 2.2rem);
    }
}


/* Mobile styles */
@media (max-width: 768px) {
    .gameArea {
        min-height: 300px;
        padding: 15px;
    }

    .submit-button {
        width: 100%;
        max-width: none;
        font-size: 1.2rem;
    }

    .instruction-header {
        font-size: 1.5rem;
        padding: 3%;
    }
}

@media (max-width: 480px) {
    .gameArea {
        padding: 10px;
    }

    .instruction-header {
        font-size: 1.2rem;
    }

    .submit-button {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

.tic-tac-toe-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 120px));
    grid-template-rows: repeat(3, minmax(80px, 120px));
    gap: 10px;
    background: #f8ded6;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    justify-content: center;
    margin: 0 auto;
    width:fit-content;
}

.cell {
    width: 100%;
    height: 100%;
    min-width: 80px;
    min-height: 80px;
    aspect-ratio: 1;
    background: #ffeae4;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: bold;
    color: #3b3b3b;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.cell:hover {
    background: #ffd9d0;
    transform: scale(1.05);
}

.cell:active {
    transform: scale(0.95);
}

/* Large screen game board */
@media (min-width: 1200px) {
    .tic-tac-toe-board {
        grid-template-columns: repeat(3, minmax(120px, 150px));
        grid-template-rows: repeat(3, minmax(120px, 150px));
        gap: 15px;
        padding: 30px;
    }

    .cell {
        min-width: 120px;
        min-height: 120px;
        font-size: clamp(3rem, 4vw, 4.5rem);
        border-radius: 18px;
    }
}

@media (min-width: 1920px) {
    .tic-tac-toe-board {
        grid-template-columns: repeat(3, minmax(150px, 180px));
        grid-template-rows: repeat(3, minmax(150px, 180px));
        gap: 20px;
        padding: 40px;
    }

    .cell {
        min-width: 150px;
        min-height: 150px;
        font-size: clamp(3.5rem, 3.5vw, 5rem);
        border-radius: 20px;
    }
}



/* Responsive game board */
@media (max-width: 768px) {
    .tic-tac-toe-board {
        grid-template-columns: repeat(3, minmax(70px, 100px));
        grid-template-rows: repeat(3, minmax(70px, 100px));
        gap: 8px;
        padding: 15px;
    }

    .cell {
        min-width: 70px;
        min-height: 70px;
        font-size: 2rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .tic-tac-toe-board {
        grid-template-columns: repeat(3, minmax(60px, 80px));
        grid-template-rows: repeat(3, minmax(60px, 80px));
        gap: 6px;
        padding: 10px;
    }

    .cell {
        min-width: 60px;
        min-height: 60px;
        font-size: 1.8rem;
        border-radius: 10px;
    }
}

@media (max-width: 360px) {
    .tic-tac-toe-board {
        grid-template-columns: repeat(3, minmax(50px, 70px));
        grid-template-rows: repeat(3, minmax(50px, 70px));
        gap: 5px;
        padding: 8px;
    }

    .cell {
        min-width: 50px;
        min-height: 50px;
        font-size: 1.5rem;
    }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s;
    padding: 20px;
    box-sizing: border-box;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: linear-gradient(-45deg, #ff6347 0%, #ffeae4 100%);
    border-radius: 24px;
    min-width: 280px;
    max-width: 90vw;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(139,0,0,0.25), 0 2px 16px rgba(0,0,0,0.15);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 3px solid #ff0000;
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #3b3b3b;
    animation: modalPopIn 0.25s cubic-bezier(.68,-0.55,.27,1.55);
    box-sizing: border-box;
}

/* Large screen modal */
@media (min-width: 1200px) {
    .modal-container {
        max-width: 600px;
        padding: 2rem 2.5rem;
        gap: 1.5rem;
    }
}

@media (min-width: 1920px) {
    .modal-container {
        max-width: 700px;
        padding: 2.5rem 3rem;
        gap: 2rem;
        border-radius: 28px;
    }
}


@keyframes modalPopIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header h3 {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: #b22222;
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
    text-align: center;
    word-wrap: break-word;
}

.modal-body {
    margin-bottom: 1rem;
    color: #3b3b3b;
    font-size: clamp(1rem, 3vw, 1.6rem);
    text-align: center;
    word-wrap: break-word;
}

/* Large screen modal text */
@media (min-width: 1200px) {
    .modal-header h3 {
        font-size: clamp(1.5rem, 3vw, 2.2rem);
    }

    .modal-body {
        font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    }
}

@media (min-width: 1920px) {
    .modal-header h3 {
        font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    }

    .modal-body {
        font-size: clamp(1.4rem, 2vw, 2rem);
    }
}



.modal-textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    padding: 0.75rem;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    border-radius: 12px;
    border: 2px solid #ff6347;
    background: #fff8f6;
    color: #3b3b3b;
    font-family: inherit;
    transition: border 0.2s;
    box-sizing: border-box;
}

.modal-textarea:focus {
    border: 2px solid #ff0000;
    outline: none;
    background: #ffeae4;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mobile-specific modal adjustments */
@media (max-width: 768px) {
    .modal-backdrop {
        padding: 15px;
    }

    .modal-container {
        min-width: 260px;
        padding: 1.25rem 1.5rem;
        border-radius: 20px;
    }

    .modal-footer {
        gap: 0.5rem;
    }

    .modal-footer .submit-button {
        flex: 1 1 100%;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .modal-backdrop {
        padding: 10px;
    }

    .modal-container {
        padding: 1rem;
        border-radius: 16px;
        gap: 1rem;
    }

    .modal-textarea {
        min-height: 60px;
        padding: 0.5rem;
    }
}

/* Form input responsive styles */
.form-control {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #ff6347;
    background: white;
    color: #3b3b3b;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.2);
}

/* Large screen form inputs */
@media (min-width: 1200px) {
    .form-control {
        padding: 14px;
        font-size: 1.2rem;
        border-radius: 12px;
    }
}

@media (min-width: 1920px) {
    .form-control {
        padding: 16px;
        font-size: 1.4rem;
        border-radius: 14px;
    }
}


/* Responsive form adjustments */
@media (max-width: 768px) {
    .form-control {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .form-control {
        padding: 10px;
        font-size: 16px;
    }
}

/* Responsive container adjustments */
.container-fluid {
    padding: 0 15px;
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 0 10px;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .submit-button {
        min-height: 48px; /* Touch target size */
    }

    .cell {
        min-width: 70px;
        min-height: 70px;
    }
}

/* Ensure proper spacing and layout */
.row {
    margin-bottom: 0;
}

.row.mb-3 {
    margin-bottom: 1rem !important;
}

.row.mb-4 {
    margin-bottom: 1.5rem !important;
}

.row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

/* Scoreboard Styles */
.scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.85), rgba(255, 160, 160, 0.85));
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.scoreboard-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.player-info {
    text-align: center;
    width: 100%;
}

.player-name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.player-indicator {
    width: 12px;
    height: 12px;
    background-color: #FFD700;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.player-indicator.hidden {
    visibility: hidden;
}

.player-name {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: bold;
    color: #2b2b2b;
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

.rounds-won {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #3b3b3b;
    margin: 0;
}

.player-symbol {
    width: clamp(60px, 15vw, 90px);
    height: clamp(60px, 15vw, 90px);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
    color: #3b3b3b;
}

.player-symbol.symbol-x {
    color: #1E90FF;
}

.player-symbol.symbol-o {
    color: #DC143C;
}

.scoreboard-vs {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: SuperCereal, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Large screen scoreboard */
@media (min-width: 1200px) {
    .scoreboard {
        max-width: 100%;
        padding: 25px 40px;
        border-radius: 24px;
        margin-bottom: 35px;
    }

    .player-name {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }

    .rounds-won {
        font-size: clamp(1.1rem, 2vw, 1.4rem);
    }

    .player-symbol {
        width: clamp(80px, 12vw, 110px);
        height: clamp(80px, 12vw, 110px);
        font-size: clamp(2.5rem, 4vw, 4rem);
    }

    .scoreboard-vs {
        font-size: clamp(2rem, 3vw, 3rem);
    }

    .player-indicator {
        width: 14px;
        height: 14px;
    }
}

@media (min-width: 1920px) {
    .scoreboard {
        max-width: 100%;
        padding: 30px 50px;
        border-radius: 28px;
        margin-bottom: 40px;
    }

    .player-name {
        font-size: clamp(1.8rem, 2vw, 2.3rem);
    }

    .rounds-won {
        font-size: clamp(1.3rem, 1.8vw, 1.6rem);
    }

    .player-symbol {
        width: clamp(100px, 10vw, 130px);
        height: clamp(100px, 10vw, 130px);
        font-size: clamp(3rem, 3.5vw, 4.5rem);
    }

    .scoreboard-vs {
        font-size: clamp(2.5rem, 2.5vw, 3.5rem);
    }

    .player-indicator {
        width: 16px;
        height: 16px;
    }
}

/* Mobile scoreboard adjustments */
@media (max-width: 768px) {
    .scoreboard {
        padding: 15px 20px;
        gap: 15px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .player-name {
        font-size: 1.1rem;
    }

    .rounds-won {
        font-size: 0.85rem;
    }

    .player-symbol {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .scoreboard-vs {
        font-size: 1.3rem;
    }

    .player-indicator {
        width: 10px;
        height: 10px;
    }

    .player-name-container {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .scoreboard {
        padding: 12px 15px;
        gap: 10px;
        border-radius: 14px;
        margin-bottom: 15px;
    }

    .player-name {
        font-size: 1rem;
    }

    .rounds-won {
        font-size: 0.75rem;
    }

    .player-symbol {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .scoreboard-vs {
        font-size: 1.1rem;
    }

    .player-indicator {
        width: 8px;
        height: 8px;
    }

    .player-name-container {
        gap: 5px;
    }
}

@media (max-width: 360px) {
    .scoreboard {
        padding: 10px 12px;
        gap: 8px;
    }

    .player-name {
        font-size: 0.9rem;
    }

    .rounds-won {
        font-size: 0.7rem;
    }

    .player-symbol {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Prevent text selection on game elements */
.cell, .submit-button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling for mobile */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}


/* Form section heading */
.form-section-heading {
    text-align: center;
    color: #3b3b3b;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 4vw, 2.5rem);
}

/* Large screen form heading */
@media (min-width: 1200px) {
    .form-section-heading {
        font-size: clamp(1.8rem, 3vw, 2.8rem);
        margin-bottom: 25px;
    }
}

@media (min-width: 1920px) {
    .form-section-heading {
        font-size: clamp(2rem, 2.5vw, 3.2rem);
        margin-bottom: 30px;
    }
}


/* Form label styling */
.form-label {
    color: #3b3b3b;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
}

/* Large screen form labels */
@media (min-width: 1200px) {
    .form-label {
        font-size: clamp(1.1rem, 2vw, 1.6rem);
        margin-bottom: 8px;
    }
}

@media (min-width: 1920px) {
    .form-label {
        font-size: clamp(1.3rem, 1.5vw, 1.8rem);
        margin-bottom: 10px;
    }
}


/* Input field styling */
.input-field {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #ff6347;
}

/* Waiting screen styles */
.waiting-screen-heading {
    text-align: center;
    color: #3b3b3b;
    margin-bottom: 30px;
    font-size: clamp(1.5rem, 4vw, 3rem);
}

.waiting-screen-code-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.waiting-screen-code-label {
    color: #3b3b3b;
    font-size: clamp(1rem, 3vw, 2rem);
    margin-bottom: 10px;
    font-weight: bold;
}

.waiting-screen-code-value {
    color: #ff0000;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: bold;
    letter-spacing: 3px;
    font-family: SuperCereal;
    margin: 0;
}

/* Large screen waiting screen */
@media (min-width: 1200px) {
    .waiting-screen-heading {
        font-size: clamp(2rem, 3vw, 3.5rem);
        margin-bottom: 35px;
    }

    .waiting-screen-code-container {
        padding: 30px;
        border-radius: 20px;
    }

    .waiting-screen-code-label {
        font-size: clamp(1.3rem, 2.5vw, 2.2rem);
        margin-bottom: 15px;
    }

    .waiting-screen-code-value {
        font-size: clamp(2.5rem, 5vw, 5.5rem);
        letter-spacing: 4px;
    }
}

@media (min-width: 1920px) {
    .waiting-screen-heading {
        font-size: clamp(2.5rem, 2.5vw, 4rem);
        margin-bottom: 40px;
    }

    .waiting-screen-code-container {
        padding: 40px;
        border-radius: 25px;
    }

    .waiting-screen-code-label {
        font-size: clamp(1.5rem, 2vw, 2.5rem);
        margin-bottom: 20px;
    }

    .waiting-screen-code-value {
        font-size: clamp(3rem, 4vw, 6rem);
        letter-spacing: 5px;
    }
}



/* Game board cell content */
.cell-content {
    margin: 0;
    line-height: 1;
}

/* Modal footer button wrapper */
.modal-button-wrapper {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Responsive adjustments for waiting screen */
@media (max-width: 768px) {
    .waiting-screen-code-container {
        padding: 15px;
    }

    .waiting-screen-code-value {
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .waiting-screen-code-container {
        padding: 12px;
    }

    .waiting-screen-code-value {
        letter-spacing: 1px;
    }

    .form-section-heading {
        margin-bottom: 15px;
    }
}