﻿/* Window Responsiveness */

body {
    background-color: #5007a1;
    margin: 0;
    padding: 0;
}


.main-container {
    margin-left: auto;
    margin-right: auto;
}

.containerss {
    width: 380px;
    height: auto;
    border: 3px solid #f9f9f9;
    padding: 20px;
    border-radius: 2px;
    background-color: #5007a1;
    margin-right: auto;
    margin-left: auto;
}

#ticTacToeTitle {
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    font-size: 2.5em;
    letter-spacing: 2px;
    margin-right: auto;
    margin-left: auto;
}

/* General Style for All Buttons */
.custom-btn {
    font-family: 'Arial', sans-serif;
    padding: 20px;
    border: none;
    font-size: 1.1em;
    border-radius: 50px;
    width: 80%;
    max-width: 850px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

/* Button Gradient and */
.singleplayer-btn {
    background: linear-gradient(45deg, #9e80c5, #7a5ba5);
}

.multiplayer-btn {
    background: linear-gradient(45deg, #9e80c5, #7a5ba5);
}

.options-btn {
    background: linear-gradient(45deg, #9e80c5, #7a5ba5);
}


/* Spacing between buttons */
.col-12.mt-4.text-center {
    margin-top: 30px;
}



/* Header Section Styling */
.header-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}


/* user icon - Player1 and player2 Styling */
.user-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 200px;
}

/*player name */
.movexo-textboxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    background-color: #5007a1;
}


.downarrow {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #5007a1;
    height: 25px;
    gap: 250px; /* spacing between X and O arrows */
    margin-top: -13px;
}

.turn-indicator {
    font-size: 22px;
    color: pink;
}

/*Move x and move o styling*/

.Movexo-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

/* Title styling */
.title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

/* Input for Name */
.input-container {
    margin-bottom: 15px;
}

    .input-container label {
        font-size: 16px;
        margin-right: 10px;
        display: inline-block;
        width: 100px;
        color: white
    }

    .input-container input {
        padding: 5px;
        font-size: 14px;
        width: 130px;
        margin-left: 65px;
    }

/* Dropdown for Game Border */
.select-container {
    margin-bottom: 15px;
}

    .select-container label {
        font-size: 16px;
        display: inline-block;
        width: 150px;
        color: white;
    }


    .select-container select {
        padding: 5px;
        font-size: 14px;
        width: 125px;
        margin-left: 28px;
    }

/* Game Price images */
.image-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

    .image-container label {
        font-size: 16px;
        margin-right: 10px;
        display: inline-block;
        color: white;
    }

.image-options {
    display: flex;
    justify-content: flex-start;
}

.label_YesNo {
    width: 100px;
}

/*high light the radiobutton based on selection*/
.List_YesNo {
    display: flex;
    gap: 10px;
}

    .List_YesNo label {
        display: inline-block;
        padding: 2px;
        border: 1px solid transparent;
        border-radius: 2px;
        cursor: pointer;
        transition: border-color 0.3s ease, background-color 0.3s ease;
    }

    .List_YesNo input[type="radio"]:checked + label {
        /*border-color: #9e80c5;*/
        background-color: #f0e6ff;
    }

    .List_YesNo label img {
        display: block;
        max-width: 100%;
        height: 40px;
    }

.image-options label {
    margin: 0 10px;
}

/* Hide radio buttons but keep them interactive */
input[type="radio"] {
    display: none;
}

.image-container img,
.first-move-container img {
    width: 50px;
    height: 50px;
    cursor: pointer;
}

/* First Move images */
.first-move-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

    .first-move-container label {
        font-size: 16px;
        display: inline-block;
        margin-bottom: 10px;
        color: white;
    }

.image-options {
    display: flex;
    justify-content: flex-start;
    margin-left: 65px;
}

.image-options1 {
    margin-left: 75px;
    height: 50px;
}


.image-options2 {
    margin-left: 4px;
}

.image-options label {
    margin: 0 5px;
}

.image-options1 label {
    margin: 0 4px;
}

.image-options2 label {
    margin: 0 4px;
}

/* Purple Button Styling */
.purple-button {
    font-size: 16px;
    padding-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 55px;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(45deg, #9e80c5, #7a5ba5);
}


/* Button container alignment */
.button-container {
    text-align: center;
    margin-top: 20px;
}


.tilecontainers {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 33% 33% 33%;
    grid-template-rows: 33% 33% 33%;
    max-width: 300px;
    max-height: 350px;
    border: 4px solid #ffffff;
    background-color: #5007a1;
}

.tile {
    margin: 0 auto;
    border: 2px solid #8058a3;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 500px;
    background-color: #5007a1;
    /* Hide the default broken image icon */
    content: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
}


/*style for Board 4X4 */
.tailcontainers4x4 {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 25% 25% 25% 25%;
    grid-template-rows: 25% 25% 25% 25%;
    max-width: 360px;
    max-height: 370px;
    border: 4px solid #ffffff;
    background-color: #5007a1;
}

.tiles {
    margin: 0 auto;
    border: 2px solid #8058a3;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 500px;
    cursor: pointer;
    background-color: #5007a1;
    /* Hide the default broken image icon */
    content: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
}

/* Draw a line after player win*/

.highlight {
    background-color: rgba(255, 0, 0, 0.5); /* Semi-transparent red */
    transition: background-color 0.5s ease-in-out;
}

/*Result page style*/

.labelwinner {
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
    align-items: center;
    width: 200px;
}

.Resultcontainers {
    width: 350px;
    height: 280px;
    border: 3px solid #f9f9f9;
    padding: 20px;
    border-radius: 2px;
    background-color: #5007a1;
    margin-right: auto;
    margin-left: auto;
}



/* Header Section Styling */
.header-iconss {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.home_icon i, .replay-icon i {
    cursor: pointer;
    text-decoration: none;
    margin-top: 30px;
    color: #9e80c5;
    margin-left: 30px;
    margin-right: 30px;
    background-color: #5007a1;
}


.labelplayhome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 40px;
    margin-right: 40px;
    background-color: #5007a1;
    font-size: 20px;
}

.labelHome, .labelPlay {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 60px;
    text-align: center;
    background-color: #5007a1;
}


/*Winninng line style */
/* Horizontal win */
.horizontal-win {
    position: absolute;
    width: 290px;
    height: 5px;
    background-color: #9e80c5;
    margin-left: auto;
    margin-right: auto;
}

/* Vertical win */
.vertical-win {
    position: absolute;
    width: 5px;
    height: 290px;
    background-color: #9e80c5;
    margin-left: auto;
    margin-right: auto;
}



/* Left diagonal win */
.left-diagonal-win {
    position: absolute;
    width: 350px;
    height: 5px;
    background-color: #9e80c5;
    margin-left: auto;
    margin-right: auto;
    top: 420px;
    transform: rotate(45deg);
}

/* Right diagonal win */
.right-diagonal-win {
    position: absolute;
    width: 350px;
    height: 5px;
    background-color: #9e80c5;
    margin-left: auto;
    margin-right: auto;
    top: 380px;
    transform: rotate(-45deg);
}


/*Game rule paragraph*/

.titlerule {
    color: #9e80c5;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.gameruletext {
    color: white;
    text-align: justify;
    font-size: 16px;
}


/*option page with toggle*/

.toggle-container label {
    color: white;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

#toggle1 {
    margin-left: 150px;
    padding: 10px;
}

#toggle2 {
    margin-left: 125px;
    padding: 10px;
}


.switch input {
    opacity: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    align-content: end;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #2196F3;
    align-content: flex-end
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }



/* Mobile Responsiveness */
@media (max-width: 500px) {



    .header-icons {
        flex-direction: row;
        align-items: center;
        margin-left: 20px;
        margin-right: 20px;
    }


    .title {
        font-size: 20px;
        margin-bottom: 15px;
    }


    .input-container input {
        /*width: 30%;
        margin-left: 50px;*/

        padding: 5px;
        font-size: 14px;
        width: 120px;
        margin-left: 65px;
    }


    .select-container select {
        width: 120px;
        margin-left: 23px;
    }


    .image-options {
        justify-content: center;
    }

    /* Adjust  images */
    .image-options1 {
        margin-left: 78px;
    }



    .purple-button {
        width: 100%;
    }


    .containerss {
        width: 100%;
        padding: 20px;
        margin-left: auto;
        margin-right: auto;
    }


    /* user icon - Player1 and player2 Styling */
    .user-icons {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 180px;
    }

    /*player name */
    .movexo-textboxes {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        background-color: #5007a1;
    }


    /*Move x and move o styling*/
    .Movexo-icons {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
        gap: 20px;
    }



    /*Result page style*/
    .labelwinner {
        margin-right: 200px;
        margin-left: 200px;
        width: 200px;
    }

    .Resultcontainers {
        width: 350px;
        height: 280px;
        border: 3px solid #f9f9f9;
        padding: 20px;
        border-radius: 2px;
        background-color: #5007a1;
        margin-right: auto;
        margin-left: auto;
    }


    .tilecontainers {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 33% 33% 33%;
        max-width: 305px;
        max-height: 350px;
        border: 4px solid #ffffff;
        background-color: #5007a1;
    }

    .tile {
        width: 99px;
        height: 100px;
        font-size: 500px;
    }

    .winning-line {
        height: 16px;
        left: 100px;
    }

        .winning-line[data-type="vertical"] {
            height: 10px;
        }

    .tailcontainers4x4 {
        margin: 0 auto;
        display: grid;
        grid-template-columns: 25% 25% 25% 25%;
        grid-template-rows: 25% 25% 25% 25%;
        max-width: 360px;
        max-height: 370px;
        border: 4px solid #ffffff;
        background-color: #5007a1;
    }

    .tiles {
        margin: 0 auto;
        border: 2px solid #8058a3;
        width: 90px;
        height: 90px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 500px;
        cursor: pointer;
        background-color: #5007a1;
    }

    .labelwinner {
        margin-right: auto;
        margin-left: auto;
        justify-content: center;
        align-items: center;
        width: 200px;
    }
}


/* For very small screens */
@media (max-width: 300px) {
    /* Adjust the font sizes */
    .title {
        font-size: 18px;
    }

    .input-container label,
    .select-container label,
    .image-container label,
    .first-move-container label {
        font-size: 14px;
    }

    .input-container input,
    .select-container select {
        font-size: 12px;
        width: 30px;
    }

    .purple-button {
        font-size: 14px;
        padding: 10px;
    }
}
