/**
 * Custom styles for Dragonseeker game
 * Built on top of Tailwind CSS and DaisyUI
 */

/* HTMX Loading Indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom animations */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Role-specific styling */
.role-dragon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
}

.role-knight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.1));
}

.role-villager {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Button loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* WebSocket connection status badge */
#ws-status {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--b2));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--bc) / 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--bc) / 0.3);
}

/* Print styles */
@media print {
    .navbar, .footer, button, .btn {
        display: none !important;
    }
}

/* Responsive text sizing */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.25rem;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid hsl(var(--p));
    outline-offset: 2px;
}

/* Disabled state */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast container */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
