:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --radius: 1rem;
}

body {
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Board Cells */
.cell {
    aspect-ratio: 1 / 1;
    font-size: 3rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

/* Win Line Animation */
#win-line line {
    transition: stroke-dashoffset 0.5s ease-in-out;
    stroke-width: 4;
}

/* Custom Dropdown Styling */
#difficulty-menu {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Transitions */
#modal-overlay.opacity-100 {
    opacity: 1;
}

#modal-content.scale-100 {
    transform: scale(1);
}

/* Responsive Grid Adjustments */
@media (max-width: 380px) {
    #board {
        width: 280px;
        height: 280px;
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

/* Custom Scrollbar for Dropdowns */
#difficulty-menu::-webkit-scrollbar {
    width: 6px;
}

#difficulty-menu::-webkit-scrollbar-track {
    background: transparent;
}

#difficulty-menu::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Active Player Highlight */
.ring-2 {
    transition: all 0.3s ease;
}

/* Buttons */
button {
    touch-action: manipulation;
}
