/* GolfMetrics Custom Styles */

/* Gradients and animations */
.gradient-bg {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
    background: #fafafa;
    border-radius: 0.5rem;
    padding: 1rem;
}

.chart-container canvas {
    max-height: 100%;
    border-radius: 0.375rem;
}

/* Chart tabs */
.chart-tab-btn {
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.chart-tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Chart loading states */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: #6b7280;
}

.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: #dc2626;
}

.chart-no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: #9ca3af;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-online {
    background-color: #dcfce7;
    color: #166534;
}

.status-offline {
    background-color: #fef2f2;
    color: #991b1b;
}

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

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

/* Form styles */
.form-input {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Level and progress bars */
.level-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    height: 100%;
    border-radius: 1rem;
    transition: width 0.5s ease;
}

/* Badge animations */
.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Experience gain animation */
.exp-gain {
    animation: expGain 0.6s ease-out;
}

@keyframes expGain {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-20px) scale(1.2);
        opacity: 0;
    }
}

/* Dashboard cards */
.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #e5e7eb;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .chart-container {
        height: 280px;
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
        padding: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .chart-tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    .chart-container {
        height: 200px;
        margin: 0.5rem 0;
    }
}