/**
 * Professional Wordley UI Styles
 */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --color-correct: #6aaa64;
    --color-present: #c9b458;
    --color-absent: #787c7e;
    --color-empty: #ffffff;
    --color-border: #d3d6da;
    --color-text: #1a1a1b;
    --color-bg: #ffffff;
    --color-header-bg: #ffffff;
    --color-modal-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark {
    --color-empty: #121213;
    --color-border: #3a3a3c;
    --color-text: #ffffff;
    --color-bg: #121213;
    --color-header-bg: #1a1a1b;
    --color-modal-bg: #1a1a1b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ==================== BASE STYLES ==================== */
* {
    transition-property: background-color, border-color, color, transform, box-shadow;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.no-transition * {
    transition: none !important;
}

/* ==================== LOGO STYLES ==================== */
header h1 a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    letter-spacing: -0.02em;
}

header h1 a span:first-child {
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

header h1 a:hover span:first-child {
    animation: logoWobble 0.5s ease-in-out;
}

@keyframes logoWobble {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg) scale(1.05);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    background-clip: padding-box;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: padding-box;
}

/* ==================== HEADER ENHANCEMENTS ==================== */
header {
    background: var(--color-header-bg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

header .container > div {
    position: relative;
}

/* Logo styling moved to BASE STYLES section */

header button {
    position: relative;
    overflow: hidden;
}

header button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

header button:hover::before {
    width: 100px;
    height: 100px;
}

/* ==================== MODE TOGGLE ENHANCEMENT ==================== */
#mode-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

#mode-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
    border-radius: 50%;
}

#mode-toggle:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* ==================== GAME BOARD ENHANCEMENTS ==================== */
#game-board {
    perspective: 1000px;
    max-width: 350px;
    margin: 0 auto;
}

/* Container responsiveness */
@media (min-width: 1024px) {
    #game-container {
        max-width: 400px;
    }
    
    #keyboard {
        max-width: 600px;
    }
}

#game-board > div {
    margin-bottom: 0.25rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
}

#game-board > div > div {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 3rem;
    max-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--color-border);
    background: var(--color-empty);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    transform-style: preserve-3d;
    border-radius: 0.375rem;
}

#game-board > div > div:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Active cell pulse effect */
#game-board > div > div.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

/* ==================== KEYBOARD ENHANCEMENTS ==================== */
.keyboard-key {
    cursor: pointer;
    user-select: none;
    min-width: 1.8rem;
    padding: 0.5rem 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Responsive keyboard sizing for smaller screens */
@media (max-width: 640px) {
    .keyboard-key {
        min-width: 1.5rem;
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
}

.keyboard-key::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.keyboard-key:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.keyboard-key:active {
    transform: translateY(0) scale(0.95);
    box-shadow: var(--shadow-sm);
}

.keyboard-key:active::before {
    width: 100px;
    height: 100px;
}

/* Keyboard color states with gradients */
.keyboard-key[data-state="correct"] {
    background: linear-gradient(135deg, #6aaa64 0%, #5a9a54 100%);
    border-color: #5a9a54;
}

.keyboard-key[data-state="present"] {
    background: linear-gradient(135deg, #c9b458 0%, #b9a448 100%);
    border-color: #b9a448;
}

.keyboard-key[data-state="absent"] {
    background: linear-gradient(135deg, #787c7e 0%, #686c6e 100%);
    border-color: #686c6e;
}

/* ==================== ANIMATIONS ==================== */
@keyframes flip {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -2rem);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-flip {
    animation: flip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-shake {
    animation: shake 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-bounce {
    animation: bounce 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-modal-bg);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    font-weight: 600;
    border: 2px solid var(--color-border);
}

/* ==================== MODAL ENHANCEMENTS ==================== */
.fixed.inset-0 {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.dark .fixed.inset-0 {
    background: rgba(0, 0, 0, 0.7);
}

.fixed.inset-0 > div {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal content styling */
.bg-white.dark\\:bg-gray-800 {
    background: var(--color-modal-bg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

/* ==================== STATISTICS BAR ==================== */
.w-full.bg-gray-200 {
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.dark .w-full.bg-gray-200 {
    background: rgba(255, 255, 255, 0.1);
}

.w-full.bg-gray-200 > div {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.w-full.bg-gray-200 > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== BUTTONS ==================== */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:not(.keyboard-key):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:not(.keyboard-key):active {
    transform: translateY(0);
}

/* Primary button style */
.bg-blue-500, .bg-indigo-600 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: var(--shadow-md);
}

.bg-blue-500:hover, .bg-indigo-600:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: var(--shadow-lg);
}

/* ==================== LOADING STATE ==================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== FOCUS STYLES ==================== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* ==================== COUNTDOWN TIMER ==================== */
#countdown-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#countdown-container p {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ==================== MOBILE RESPONSIVENESS ==================== */
@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }
    
    header {
        padding: 0;
    }
    
    header .container {
        padding: 0.375rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
    
    main {
        padding: 0.25rem 0.5rem;
        max-height: calc(100vh - 60px - 50px); /* viewport - header - footer */
        overflow-y: auto;
    }
    
    footer {
        margin-top: 0.5rem;
        padding: 0.25rem;
    }
    
    footer p {
        font-size: 0.625rem;
        margin: 0;
    }
    
    /* Game spacing optimizations */
    #game-board {
        max-width: 280px;
        margin-bottom: 0.25rem;
    }
    
    #game-board > div {
        margin-bottom: 0.125rem;
        gap: 0.125rem;
    }
    
    #game-board > div > div {
        max-width: 2.5rem;
        max-height: 2.5rem;
        font-size: 1.25rem;
        border-width: 1.5px;
    }
    
    /* Compact spacing for all game elements */
    #game-container > div:not(#game-board) {
        margin-bottom: 0.25rem !important;
    }
    
    /* Countdown timer - more compact */
    #countdown-container {
        margin-bottom: 0.25rem;
    }
    
    #countdown-container .inline-block {
        padding: 0.25rem 0.5rem;
    }
    
    #countdown-container p {
        font-size: 0.625rem;
    }
    
    #countdown-timer {
        font-size: 0.75rem;
    }
    
    /* Mode selector buttons - compact */
    #daily-mode-btn,
    #practice-mode-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
        border-radius: 0.375rem;
    }
    
    #daily-mode-btn svg,
    #practice-mode-btn svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Current guess display - compact */
    #current-guess .inline-flex {
        padding: 0.25rem 0.5rem;
    }
    
    #current-guess p {
        font-size: 0.625rem;
    }
    
    #current-guess svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Keyboard - optimized for mobile */
    #keyboard {
        margin-bottom: 0.25rem;
    }
    
    #keyboard .flex.flex-col {
        gap: 0.125rem;
    }
    
    .keyboard-key {
        padding: 0.5rem 0.25rem;
        font-size: 0.625rem;
        min-width: 1.5rem;
        border-radius: 0.25rem;
    }
    
    /* Action buttons - compact */
    #new-game-btn,
    #share-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
    }
    
    #new-game-btn svg,
    #share-btn svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Messages - compact */
    #game-message .inline-block {
        padding: 0.375rem 0.75rem;
        font-size: 0.625rem;
    }
    
    .toast {
        max-width: 90%;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.25rem;
        max-height: calc(100vh - 50px - 40px);
    }
    
    #game-board {
        max-width: 260px;
    }
    
    #game-board > div > div {
        max-width: 2.25rem;
        max-height: 2.25rem;
        font-size: 1.125rem;
    }
    
    .keyboard-key {
        padding: 0.375rem 0.125rem;
        font-size: 0.5rem;
        min-width: 1.25rem;
    }
    
    header h1 {
        font-size: 1.125rem;
    }
}

/* Height-constrained devices (landscape mobile or short screens) */
@media (max-height: 700px) {
    main {
        padding: 0.25rem;
        max-height: calc(100vh - 50px - 40px);
    }
    
    #game-board > div > div {
        max-width: 2.25rem;
        max-height: 2.25rem;
        font-size: 1.125rem;
    }
    
    .keyboard-key {
        padding: 0.375rem 0.25rem;
    }
    
    #countdown-container,
    .mb-3 {
        margin-bottom: 0.25rem !important;
    }
}

@media (max-height: 600px) {
    header {
        display: none; /* Hide header on very short screens for better game visibility */
    }
    
    main {
        max-height: calc(100vh - 30px);
    }
    
    #game-board > div > div {
        max-width: 2rem;
        max-height: 2rem;
        font-size: 1rem;
    }
    
    .keyboard-key {
        padding: 0.25rem 0.125rem;
        font-size: 0.5rem;
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== CELEBRATION EFFECTS ==================== */
@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    animation: confetti-fall 3s ease-out forwards;
}

/* ==================== GAME WON/LOST MESSAGES ==================== */
.game-message {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    font-weight: 700;
    text-align: center;
}

.game-message.lost {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ==================== LANGUAGE SELECTOR ==================== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

/* Language button flag emoji */
#language-btn {
    font-size: 1.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Language menu flags */
#language-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#language-menu a span {
    display: inline-block;
    min-width: 2rem;
    text-align: center;
}

/* ==================== GLASS MORPHISM EFFECT ==================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== HOW TO PLAY SECTION ==================== */
.how-to-play-section {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-to-play-section h2 {
    position: relative;
}

.how-to-play-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 2px;
}

/* Rule cards hover effects */
.rule-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.rule-card:hover::before {
    left: 100%;
}

.rule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Color guide examples enhanced */
.color-example {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-example:hover {
    transform: scale(1.02);
}

.color-example .tile-row {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.color-example .tile {
    position: relative;
    overflow: hidden;
}

.color-example .tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.color-example:hover .tile::after {
    opacity: 1;
}

/* Game mode cards */
.game-mode-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-mode-card:hover::before {
    opacity: 1;
}

.game-mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15);
}

/* Pro tips enhanced styling */
.pro-tips-container {
    position: relative;
}

.pro-tips-container::before {
    content: '💡';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.tip-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-item:hover {
    transform: translateX(5px);
}

.tip-number {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-item:hover .tip-number {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Start playing button enhanced */
.start-playing-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-playing-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.start-playing-btn:hover::before {
    width: 300px;
    height: 300px;
}

.start-playing-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.4);
}

/* Pulse effect for game board when start playing is clicked */
.pulse-effect {
    animation: pulseBoard 1s ease-in-out;
}

@keyframes pulseBoard {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Responsive enhancements for how-to-play */
@media (max-width: 768px) {
    .how-to-play-section {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .how-to-play-section h2 {
        font-size: 1.5rem;
    }
    
    .rule-card,
    .game-mode-card {
        padding: 1rem;
    }
    
    .color-example .tile {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .pro-tips-container {
        padding: 1rem;
    }
    
    .tip-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .how-to-play-section {
        padding: 0.75rem;
    }
    
    .color-example .tile {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    
    .rule-card h4,
    .game-mode-card h4 {
        font-size: 0.875rem;
    }
    
    .rule-card p,
    .game-mode-card p {
        font-size: 0.75rem;
    }
}
