/* Shot Accuracy Tracker Styles */

.shot-tracker-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

.shot-tracker-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 20px 20px;
    pointer-events: none;
}

.shot-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.shot-tracker-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shot-tracker-title .icon {
    font-size: 20px;
}

.shot-tracker-mode {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shot-tracker-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.shot-btn {
    flex: 1;
    padding: 20px 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shot-btn:active {
    transform: scale(0.95);
}

.shot-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.shot-btn-hit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.shot-btn-hit:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.shot-btn-miss {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

.shot-btn-miss:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
    transform: translateY(-2px);
}

.shot-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.shot-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.control-btn.danger {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.control-btn.danger:hover:not(:disabled) {
    background: rgba(244, 67, 54, 0.5);
}

/* Achievement notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 300px;
    font-weight: 600;
}

.achievement-notification.show {
    transform: translateX(0);
}

.achievement-notification .achievement-icon {
    font-size: 24px;
    margin-right: 12px;
}

.achievement-notification .achievement-text {
    display: flex;
    align-items: center;
}

/* Loading state */
.shot-tracker-loading {
    opacity: 0.6;
    pointer-events: none;
}

.shot-tracker-loading .shot-btn {
    position: relative;
}

.shot-tracker-loading .shot-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.shot-tracker-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    text-align: center;
    padding: 20px;
}

.error-message {
    font-weight: 600;
    margin-bottom: 12px;
}

.retry-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .shot-tracker-widget {
        margin: 12px 0;
        padding: 20px;
        border-radius: 12px;
    }
    
    .shot-tracker-buttons {
        gap: 12px;
    }
    
    .shot-btn {
        padding: 16px 12px;
        font-size: 16px;
        min-height: 70px;
    }
    
    .shot-stats {
        gap: 12px;
    }
    
    .stat-item {
        padding: 10px 6px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .achievement-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .achievement-notification.show {
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .shot-tracker-widget {
        background: #000;
        border: 2px solid #fff;
    }
    
    .shot-btn-hit {
        background: #0f0;
        color: #000;
    }
    
    .shot-btn-miss {
        background: #f00;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .shot-btn,
    .control-btn,
    .achievement-notification {
        transition: none;
    }
    
    .shot-btn:hover,
    .control-btn:hover {
        transform: none;
    }
    
    @keyframes spin {
        to {
            transform: none;
        }
    }
}
