/* 🎨 MODERN BUY NOW TILE - PREMIUM DESIGN SYSTEM */

/* Modern Badge System for Buy Now */
.badge-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Live Badge for Active Auctions */
.badge-mini.live {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
    animation: livePulse 2s infinite;
}

.badge-mini.live .pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3); }
    50% { box-shadow: 0 6px 16px rgba(52, 199, 89, 0.5); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.8); }
}

/* Ended Badge */
.badge-mini.ended {
    background: linear-gradient(135deg, #8e8e93 0%, #636366 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(142, 142, 147, 0.3);
}

/* Category Badge */
.badge-mini.category {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(10px);
}

/* Modern Stats Section */
.stats-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-mini:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modern Price Box */
.price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.price-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    animation: priceGlow 3s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.label-tiny {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.price-compact {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

/* Reserve Indicator */
.reserve-indicator {
    font-size: 1rem;
    margin-left: 0.5rem;
    animation: reserveBounce 2s infinite;
}

.reserve-indicator.met {
    color: #34c759;
    filter: drop-shadow(0 2px 4px rgba(52, 199, 89, 0.3));
}

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

/* Modern Time Box */
.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.9) 0%, rgba(249, 115, 22, 0.9) 100%);
    border-radius: 16px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.time-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff8f00, #ffb74d);
    animation: timeFlow 2s ease-in-out infinite;
}

@keyframes timeFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.time-compact {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.time-compact[data-urgent="true"] {
    color: #ff3b30;
    animation: urgentPulse 1s infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
    }
    50% { 
        opacity: 0.8; 
        text-shadow: 0 2px 8px rgba(255, 59, 48, 0.8), 0 0 20px rgba(255, 59, 48, 0.4);
    }
}

.end-date-tiny {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Ultra Modern Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-align: center;
    justify-content: center;
    min-height: 44px;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Primary Action Button (Place Bid) */
.btn-primary {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
    border: 2px solid rgba(0, 122, 255, 0.2);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056cc 0%, #4a4acc 100%);
}

/* Secondary Button */
.btn-secondary {
    background: linear-gradient(135deg, rgba(142, 142, 147, 0.8) 0%, rgba(99, 99, 102, 0.8) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(142, 142, 147, 0.3);
    border: 2px solid rgba(142, 142, 147, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(142, 142, 147, 0.4);
    background: linear-gradient(135deg, rgba(99, 99, 102, 0.9) 0%, rgba(72, 72, 74, 0.9) 100%);
    color: white;
    text-decoration: none;
}

/* Disabled Button */
.btn-disabled {
    background: linear-gradient(135deg, rgba(60, 60, 67, 0.6) 0%, rgba(44, 44, 46, 0.6) 100%);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    box-shadow: none;
}

/* Mini Buttons (Watch, Share) */
.btn-mini {
    padding: 0.5rem;
    border-radius: 10px;
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-mini:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-mini.watch.active {
    background: linear-gradient(135deg, #ff3b30 0%, #ff6b35 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-mini.share {
    background: linear-gradient(135deg, #30d158 0%, #34c759 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* Button Icons */
.btn-icon-bid,
.btn-icon-buy,
.btn-icon-login,
.btn-icon-owner,
.btn-icon-ended,
.btn-icon-suspended {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Header Layout Improvements */
.domain-header-single-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.domain-header-single-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    background-size: 200% 100%;
    animation: headerGradient 4s ease-in-out infinite;
}

@keyframes headerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.domain-name-compact {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    word-break: break-all;
    line-height: 1.2;
}

.auction-info-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Action Buttons Group */
.action-buttons-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .domain-header-single-line {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .header-left-section {
        justify-content: center;
    }
    
    .stats-section,
    .auction-info-section {
        justify-content: center;
    }
    
    .action-buttons-group {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .domain-header-single-line {
        padding: 1.25rem 1.5rem;
        margin: 1rem 0;
        gap: 1.25rem;
    }
    
    .domain-name-compact {
        font-size: 1.5rem;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .stat-mini {
        width: 100%;
        justify-content: center;
    }
    
    .auction-info-section {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .price-box,
    .time-box {
        width: 100%;
        max-width: 200px;
    }
    
    .action-buttons-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .domain-header-single-line {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .domain-name-compact {
        font-size: 1.25rem;
    }
    
    .price-compact {
        font-size: 1.2rem;
    }
    
    .time-compact {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .btn-mini {
        min-width: 40px;
        min-height: 40px;
        font-size: 1rem;
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Performance Optimizations */
.btn,
.badge-mini,
.price-box,
.time-box,
.domain-header-single-line {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
.btn:focus,
.btn-mini:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn,
    .badge-mini,
    .price-box,
    .time-box {
        border-width: 3px;
    }
}
