/**
 * AutoView Task Runner - High Quality Professional Styles
 * Modern, cohesive design system
 */

:root {
    /* Professional Color Palette */
    --atr-primary: #2563eb;
    --atr-primary-dark: #1e40af;
    --atr-primary-light: #3b82f6;
    --atr-secondary: #64748b;
    --atr-success: #10b981;
    --atr-success-dark: #059669;
    
    /* Neutral Colors */
    --atr-gray-50: #f8fafc;
    --atr-gray-100: #f1f5f9;
    --atr-gray-200: #e2e8f0;
    --atr-gray-300: #cbd5e1;
    --atr-gray-400: #94a3b8;
    --atr-gray-500: #64748b;
    --atr-gray-600: #475569;
    --atr-gray-700: #334155;
    --atr-gray-800: #1e293b;
    --atr-gray-900: #0f172a;
    
    /* Text Colors */
    --atr-text-primary: #0f172a;
    --atr-text-secondary: #475569;
    --atr-text-light: #ffffff;
    
    /* Shadows */
    --atr-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --atr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --atr-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --atr-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --atr-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --atr-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --atr-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Start Button */
.atr-floating-button {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--atr-primary);
    border: none;
    color: var(--atr-text-light);
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--atr-shadow-lg), 0 0 0 0 rgba(37, 99, 235, 0.4);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--atr-transition);
    padding: 0;
    line-height: 1;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.atr-floating-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--atr-primary-light), var(--atr-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.atr-floating-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--atr-shadow-xl), 0 0 0 8px rgba(37, 99, 235, 0.1);
    background: var(--atr-primary-light);
}

.atr-floating-button:hover::before {
    opacity: 1;
}

.atr-floating-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--atr-shadow-md);
}

.atr-button-icon {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-left: 2px;
    font-size: 22px;
}

/* Next Page Button */
.atr-next-page-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px 32px;
    background: var(--atr-gray-900);
    color: var(--atr-text-light);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    z-index: 999997;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.atr-next-page-button.atr-visible {
    transform: translateY(0);
}

.atr-next-page-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--atr-primary), var(--atr-primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.atr-next-page-button:hover {
    background: var(--atr-gray-800);
}

.atr-next-page-button:hover::before {
    opacity: 1;
}

.atr-next-page-button:active {
    transform: translateY(0) scale(0.99);
}

.atr-next-page-button span {
    position: relative;
    z-index: 1;
}

/* Reward Box */
.atr-reward-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--atr-gray-900) 0%, var(--atr-gray-800) 100%);
    color: var(--atr-text-light);
    padding: 48px 32px;
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.atr-reward-box.atr-visible {
    transform: translateY(0);
}

.atr-reward-content {
    max-width: 640px;
    margin: 0 auto;
}

.atr-reward-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.atr-reward-message {
    font-size: 17px;
    margin: 0 0 32px 0;
    opacity: 0.9;
    color: var(--atr-gray-300);
    font-weight: 400;
    line-height: 1.6;
}

.atr-reward-code-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.atr-reward-code {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 18px 32px;
    border-radius: 12px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    color: var(--atr-text-light);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.atr-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--atr-primary);
    border: 1px solid var(--atr-primary-light);
    color: var(--atr-text-light);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--atr-transition);
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.2px;
}

.atr-copy-button:hover {
    background: var(--atr-primary-light);
    border-color: var(--atr-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.atr-copy-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.atr-copy-button.atr-copied {
    background: var(--atr-success);
    border-color: var(--atr-success-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.atr-copy-button.atr-copied:hover {
    background: var(--atr-success-dark);
    border-color: var(--atr-success-dark);
}

.atr-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.atr-copy-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.atr-copy-text {
    font-size: 15px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .atr-floating-button {
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 24px;
        font-size: 18px;
    }
    
    .atr-button-icon {
        font-size: 20px;
    }
    
    .atr-next-page-button {
        padding: 18px 24px;
        font-size: 14px;
    }
    
    .atr-reward-box {
        padding: 40px 24px;
    }
    
    .atr-reward-title {
        font-size: 28px;
    }
    
    .atr-reward-message {
        font-size: 15px;
        margin-bottom: 28px;
    }
    
    .atr-reward-code {
        font-size: 24px;
        padding: 16px 24px;
        letter-spacing: 3px;
    }
    
    .atr-reward-code-wrapper {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .atr-copy-button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .atr-floating-button {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
    
    .atr-button-icon {
        font-size: 18px;
    }
    
    .atr-reward-code {
        font-size: 20px;
        letter-spacing: 2px;
        padding: 14px 20px;
    }
    
    .atr-reward-title {
        font-size: 24px;
    }
    
    .atr-reward-message {
        font-size: 14px;
    }
    
    .atr-reward-code-wrapper {
        padding: 16px;
    }
}

/* Smooth animations */
@keyframes atr-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.atr-reward-box.atr-visible .atr-reward-content {
    animation: atr-fade-in 0.6s ease-out 0.2s both;
}

/* Accessibility improvements */
.atr-floating-button:focus,
.atr-next-page-button:focus,
.atr-copy-button:focus {
    outline: 2px solid var(--atr-primary);
    outline-offset: 2px;
}

/* Prevent body scroll when reward box is visible */
body.atr-reward-active {
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .atr-floating-button,
    .atr-next-page-button,
    .atr-copy-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .atr-floating-button,
    .atr-next-page-button,
    .atr-reward-box,
    .atr-copy-button {
        transition: none;
    }
    
    .atr-reward-box.atr-visible .atr-reward-content {
        animation: none;
    }
}
