/* Custom CSS to complement Tailwind CSS */

/* Additional component styles and utilities */
.btn-primary {
    @apply bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors;
}

.btn-secondary {
    @apply bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors;
}

.btn-outline {
    @apply border border-primary-600 text-primary-600 hover:bg-primary-600 hover:text-white px-4 py-2 rounded-md text-sm font-medium transition-colors;
}

.card {
    @apply bg-white rounded-lg shadow-md border border-gray-200;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200;
}

.card-body {
    @apply px-6 py-4;
}

.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.alert-success {
    @apply bg-green-50 border border-green-200 text-green-800 px-4 py-3 rounded-md;
}

.alert-error {
    @apply bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded-md;
}

.alert-info {
    @apply bg-blue-50 border border-blue-200 text-blue-800 px-4 py-3 rounded-md;
}

.alert-warning {
    @apply bg-yellow-50 border border-yellow-200 text-yellow-800 px-4 py-3 rounded-md;
}

/* Status badges */
.status-badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.status-badge-success {
    @apply bg-green-100 text-green-800;
}

.status-badge-error {
    @apply bg-red-100 text-red-800;
}

.status-badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.status-badge-info {
    @apply bg-blue-100 text-blue-800;
}

/* Interactive elements */
.hover-lift {
    @apply transition-transform duration-200 hover:-translate-y-1;
}

.pulse-border {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: rgb(239 68 68);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        border-color: rgb(220 38 38);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-light-blue {
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
}

/* Chess board styling */
.chess-demo-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #374151;
}

.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chess-square.light {
    background-color: #f3f4f6;
}

.chess-square.dark {
    background-color: #9ca3af;
}

/* PDF viewer container */
.pdf-container {
    height: calc(100vh - 4rem);
    overflow: hidden;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f4;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
