* { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #0e002b; font-family: Arial, Helvetica, sans-serif; } .main { min-height: 550px; width: 100%; display: grid; grid-template-columns: 55% 1% auto; } .left { /* border: red 1px solid; */ display: flex; align-items: center; justify-content: center; } .line-center { display: flex; align-items: center; justify-content: center; } .actual-line { background: white; height: 80%; width: 100%; border-radius: 5px; } .game-board { /* background: #ffffff1c; */ width: 400px; height: 400px; display: grid; grid-template-columns: auto 2% auto 2% auto; grid-template-rows: auto 2% auto 2% auto; } /* .box { */ /* background: rgba(255, 255, 255, 0.23); */ /* position: relative; */ /* } */ #box1 { grid-row: 5; grid-column: 1; } #box2 { grid-row: 5; grid-column: 3; } #box3 { grid-row: 5; grid-column: 5; } #box4 { grid-row: 3; grid-column: 1; } #box5 { grid-row: 3; grid-column: 3; } #box6 { grid-row: 3; grid-column: 5; } #box7 { grid-row: 1; grid-column: 1; } #box8 { grid-row: 1; grid-column: 3; } #box9 { grid-row: 1; grid-column: 5; } #board-line1 { background: white; grid-column: 2; grid-row: 1/6; } #board-line2 { background: white; grid-column: 4; grid-row: 1/6; } #board-line3 { background: white; grid-column: 1/6; grid-row: 2; } #board-line4 { background: white; grid-column: 1/6; grid-row: 4; } .cross, .circle { position: relative; width: 100%; height: 100%; } .crossLine1 { height: 4px; width: 100%; background: rgb(206, 0, 0); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); z-index: 1; border-radius: 7px; } .crossLine1BG { height: 7px; width: 103%; background: white; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); z-index: 0; border: 2px solid white; border-radius: 10px; } /* .crossLine1::before { content: ""; position: absolute; height: 100%; width: 100%; background: white; z-index: -1; /* Push them behind the main line * transform-origin: top left; transform: scale(1.41) rotate(-45deg) translateY(-50%); } */ .crossLine2 { height: 7px; width: 100%; background: rgb(206, 0, 0); position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translatey(-50%) rotate(135deg); border: 2px solid white; border-radius: 6px; } .mainCircle, .backCircle { border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .mainCircle { height: 70%; width: 70%; border: 5px solid cyan; z-index: 1; } .backCircle { height: 70%; width: 70%; border: 7px solid white; z-index: 0; } .right { /* border: green 1px solid; */ display: flex; align-items: center; justify-content: flex-start; } .right .content { min-height: 400px; /* min-width: 300px; */ margin: 70px; /* border: 1px solid white; */ color: white; display: flex; align-items: center; align-items: flex-start; justify-content: space-around; padding: 10px; flex-direction: column; } /* .form { position: fixed; top: 0; left: 0; height: 100%; width: 100%; background-color: rgba(0, 128, 0, 0.202); display: flex; align-items: center; justify-content: center; } */ .form { position: fixed; z-index: 2; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; } .mainForm, .winner-message { background-color: #00002c; /* margin: 2% auto; */ /* margin-top: 80px; */ padding: 20px; border: none; width: 50%; max-width: 400px; border-radius: 12px; color:white; /* margin: 10% auto; */ min-height: 100px; position: relative; transition: all 1s ease-in-out; } .mainForm::before, .winner-message::before{ content: ""; position: absolute; background: linear-gradient(45deg, #b41aaa, #6d1ffc 50%, #0dd5aa); top: -5px; right: -5px; bottom: -5px; left: -5px; z-index: -1; border-radius: 12px; animation: myAnimation 3s ease-in-out infinite; } @keyframes myAnimation { 0%, 100% { background-size: 200% 200%; background-position: 100% 0; } 50% { background-size: 200% 200%; background-position: 0 100%; } } .content label { font-size: 20px; /* margin-top: 10px; */ margin-bottom: 5px; } .content #name, .content #name1, .content #name2 { width: 100%; background: #004561; border: none; font-size: 18px; color: white; padding: 8px; border-radius: 10px; margin: 10px 0px; } .block { display: block; } .mt-20 { margin-top: 20px; } .mt-10 { margin-top: 10px; } .XorO { margin: 12px 0; user-select: none; display: flex; justify-content: space-between; align-items: center; } .XorO label { font-size: 20px; border: 2px solid rgb(0, 224, 224); padding: 5px; width: 48%; border-radius: 8px; display: flex; justify-content: space-between; font-weight: bold; color: rgb(227, 227, 227); cursor: pointer; } .XorO #x, .XorO #o { width: 20px; height: 20px; } .buttonCenter { width: 100%; display: flex; align-items: center; justify-content: space-around; } .buttonCenter button { padding: 5px 10px; border: none; border-radius: 5px; color: white; background: #6a0063; font-size: 18px; font-weight: bold; } button { cursor: pointer; } .hidden { display: none !important; } .buttons-select { display: flex; justify-content: space-around; align-items: center; } .buttons-select button, .NewGame { padding: 5px 10px; border: none; border-radius: 5px; color: white; background: #6a0063; font-size: 18px; font-weight: bold; min-width: 75px; } .actions { padding: 0 0 20px 60px; } .box { position: relative; } #winline { width: 8%; position: absolute; border: 3px solid white; border-radius: 8px; z-index: 2; } .vertical { top: 50%; left: 50%; transform: translate(-50%, -50%); height: 300%; } .horizontal { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(90deg); height: 300%; } .diagonal { top: 52%; left: 54%; transform: translate(-50%, -50%) rotate(45deg); height: 390%; } .rdiagonal { top: 53%; left: 46%; transform: translate(-50%, -50%) rotate(135deg); height: 390%; } .BGred { background: red; } .BGcyan { background: cyan; } .winner-message-bg { position: fixed; z-index: 5; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; } .flex-center { display: flex; align-items: center; justify-content: center; } .image-settings { background-repeat: no-repeat; background-position: center; background-size: cover; } .winner-name-border { border: 2px solid rgb(208, 0, 208); border-radius: 10px; padding: 20px; min-width: 250px; } .result-message { min-width: 250px; } .winner-message .cross { position: absolute; top: 16px; right: 15px; color: white; user-select: none; width: 20px; height: auto; text-align: center; cursor: pointer; font-weight: bold; transition: all 0.5s ease-in-out; } .winner-message .cross:hover { transform: rotate(180deg); } @media screen and (max-width: 890px) { .main { grid-template-columns: auto; } .main .left { padding: 50px 0; } .line-center { grid-row: 3; height: 10px; width: 100%; } .line-center .actual-line { width: 80%; } .main .actions { grid-row: 1; } }