@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for input fields and textareas */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --secondary-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    --accent-gradient: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}
body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.game-cell {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
}
.game-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}
.btn-gradient {
    background: var(--secondary-gradient);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.profile-dropdown {
    display: none;
    transform-origin: top right;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 637px) {
    

.btn-install{

    position: relative;
    bottom: 25px;

}
#profileAvatar{
    position: relative;
    top: 5px;
}

.stat-item{

    position: relative;
    bottom: 10px;

}
}
.profile-dropdown.show {
    display: block;
    animation: dropdownAnimation 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes dropdownAnimation {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.input-focus {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}
.input-focus:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #4F46E5;
}
.mobile-menu {
    display: none;
}
@media (max-width: 640px) {
    .mobile-menu {
        display: block;
    }
    .desktop-menu {
        display: none;
    }
    .game-cell {
        aspect-ratio: 1;
        font-size: 2rem;
    }
    .game-board {
        gap: 0.5rem;
    }
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .glass-effect {
        padding: 1rem;
    }
    .btn-gradient, .btn-secondary, .btn-danger {
        padding: 0.75rem;
        font-size: 1rem;
    }
    .text-3xl {
        font-size: 1.5rem;
    }
    .text-xl {
        font-size: 1.25rem;
    }
    .text-lg {
        font-size: 1rem;
    }
    .text-base {
        font-size: 0.875rem;
    }
    .mb-6 {
        margin-bottom: 1rem;
    }
    .p-8 {
        padding: 1rem;
    }
    .p-6 {
        padding: 0.75rem;
    }
    .p-4 {
        padding: 0.5rem;
    }
    .gap-4 {
        gap: 0.5rem;
    }
    .space-y-4 {
        margin-top: 0.5rem;
    }
    .space-y-3 {
        margin-top: 0.375rem;
    }
    .max-h-96 {
        max-height: 16rem;
    }
    .w-64 {
        width: 16rem;
    }
    .w-10 {
        width: 2.5rem;
        height: 2.5rem;
    }
    .text-lg {
        font-size: 1rem;
    }
    .rounded-xl {
        border-radius: 0.75rem;
    }
    .rounded-2xl {
        border-radius: 1rem;
    }
    .rounded-full {
        border-radius: 9999px;
    }
    .shadow-xl {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    .mt-6 {
        margin-top: 1rem;
    }
    .mt-4 {
        margin-top: 0.5rem;
    }
    .mt-2 {
        margin-top: 0.25rem;
    }
    .mb-2 {
        margin-bottom: 0.25rem;
    }
    .mb-3 {
        margin-bottom: 0.375rem;
    }
    .pb-4 {
        padding-bottom: 0.5rem;
    }
    .space-x-2 {
        margin-left: 0.25rem;
    }
    .space-x-4 {
        margin-left: 0.5rem;
    }
    .space-y-2 {
        margin-top: 0.25rem;
    }
    .flex {
        display: flex;
    }
    .items-center {
        align-items: center;
    }
    .justify-center {
        justify-content: center;
    }
    .justify-between {
        justify-content: space-between;
    }
    .text-center {
        text-align: center;
    }
    .hidden {
        display: none;
    }
    .grid {
        display: grid;
    }
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .aspect-square {
        aspect-ratio: 1 / 1;
    }
    .cursor-pointer {
        cursor: pointer;
    }
    .font-bold {
        font-weight: 700;
    }
    .font-semibold {
        font-weight: 600;
    }
    .text-white {
        color: white;
    }
    .text-gray-600 {
        color: #4B5563;
    }
    .text-gray-700 {
        color: #374151;
    }
    .text-gray-800 {
        color: #1F2937;
    }
    .text-red-600 {
        color: #DC2626;
    }
    .bg-gray-100 {
        background-color: #F3F4F6;
    }
    .bg-red-50 {
        background-color: #FEF2F2;
    }
    .border-gray-200 {
        border-color: #E5E7EB;
    }
    .border-b {
        border-bottom-width: 1px;
    }
    .overflow-y-auto {
        overflow-y: auto;
    }
    .overflow-x-hidden {
        overflow-x: hidden;
    }
    .pr-2 {
        padding-right: 0.25rem;
    }
    .w-full {
        width: 100%;
    }
    .h-full {
        height: 100%;
    }
    .min-h-screen {
        min-height: 100vh;
    }
    .py-4 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .px-2 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .fixed {
        position: fixed;
    }
    .top-2 {
        top: 0.25rem;
    }
    .right-2 {
        right: 0.25rem;
    }
    .z-50 {
        z-index: 50;
    }
    .relative {
        position: relative;
    }
    .absolute {
        position: absolute;
    }
    .right-0 {
        right: 0;
    }
    .mt-2 {
        margin-top: 0.25rem;
    }
    .container {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
    .max-w-md {
        max-width: 28rem;
    }
}
.swipe-indicator {
    animation: swipeAnimation 1.5s infinite;
}
@keyframes swipeAnimation {
    0% { transform: translateX(0); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}
.player-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.player-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.score-board {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.game-status {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}
/* Add touch-friendly styles */
@media (hover: none) {
    .game-cell:hover {
        transform: none;
    }
    .btn-gradient:hover, .btn-secondary:hover, .btn-danger:hover {
        transform: none;
    }
    .player-card:hover {
        transform: none;
    }
    .input-focus:focus {
        transform: none;
    }
}
/* Improve tap targets on mobile */
@media (max-width: 640px) {
    button, .game-cell, input {
        min-height: 44px;
        min-width: 44px;
    }
    .game-cell {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
/* Refresh icon animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
button:active .refresh-icon {
    animation: spin 0.5s linear;
}
/* Add pulse animation for the refresh button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}
/* Animation to indicate the leaderboard is being refreshed */
button[onclick="loadLeaderboard()"]:active {
    animation: pulse 0.8s ease-out;
}
