body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #f7d794);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: scroll;
    perspective: 1000px; /* Added for 3D effects */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ffffff' stroke='%23333333' stroke-width='2'/%3E%3C/svg%3E"), auto;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 {
    color: bla;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 3em;
    margin-bottom: 20px;
    animation: titleFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

h1:hover {
    transform: scale(1.1) rotate(-5deg);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    cursor: pointer;
    letter-spacing: 2px;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-0px) rotate(3deg); }
}

#gameBoard {
    width: 320px;
    height: 320px;
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin: 0 auto;
    padding: 10px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.5s ease;
    animation: boardFloat 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes boardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg) translateZ(0); }
    50% { transform: translateY(-10px) rotate(2deg) translateZ(20px); }
}

#gameBoard:hover {
    transform: scale(1.05) rotate(-2deg) translateZ(50px);
    box-shadow: 0 15px 45px rgba(31, 38, 135, 0.5);
}

.cell {
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.cell:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.cell:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1) rotate(5deg) translateZ(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 22h20L12 2z' fill='%23ff4757'/%3E%3C/svg%3E"), pointer;
}

.cell:hover:before {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.cell:active {
    transform: scale(0.95) translateZ(-10px);
}

#restartButton, #multiplayerButton, #aiButton {
    font-size: 18px;
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #ff4757, #ff6b81);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    justify-content: space-between;
}

#restartButton:hover, #multiplayerButton:hover, #aiButton:hover {
    background: linear-gradient(45deg, #ff6b81, #ff4757);
    transform: translateY(-5px) scale(1.05) translateZ(20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M21 12l-18 12v-24z' fill='%23ffffff'/%3E%3C/svg%3E"), pointer;
}

#status {
    margin-top: 20px;
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    animation: statusPulse 2s infinite;
}

#status:hover {
    transform: scale(1.1) rotate(-2deg);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    cursor: help;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.05) rotate(2deg); opacity: 0.8; }
}

.win {
    animation: winAnimation 0.7s ease-in-out;
}

@keyframes winAnimation {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Enhanced floating shapes */
.shape {
    position: absolute;
    opacity: 0.5;
    z-index: -1;
    transition: all 0.3s ease;
}

.shape:hover {
    opacity: 0.8;
    filter: hue-rotate(90deg);
    transform: scale(1.2);
}

.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    animation: float 8s infinite;
}

.square {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.3);
    animation: spin 10s linear infinite;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid rgba(255, 255, 255, 0.3);
    animation: bounce 6s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    50% { transform: translateY(-20px) translateX(20px) rotate(180deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* Add a pulsing effect when cells are clicked */
.cell.clicked {
    animation: cellClick 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cellClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Add loading animation for AI moves */
.cell.thinking {
    animation: thinking 1.5s infinite;
}

@keyframes thinking {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.style{
    position: relative;
    color: black;
    width: 100px;
    height: 40px;
    padding: 3px;
    background: linear-gradient(45deg, #ff6b81, #ff4757);
    font-size: 25px;
    text-align: center;
    border: 2px solid white;
    border-radius: 10px;
}
.stylev ::after{
    transform-style: flat;
   
}
.style:hover{
    cursor: pointer;
    background-color: black;
    color: white;
    transform: translateY(-10px);
    border: 2px solid red;
    transition: 0.5s ease-in-out;
}
