@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #000000 0%, #1a0000 25%, #000000 50%, #0a0000 75%, #000000 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 15px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(220, 38, 38, 0.02) 2px,
            rgba(220, 38, 38, 0.02) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.header {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 0, 0, 0.9) 100%),
        linear-gradient(45deg, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    backdrop-filter: blur(15px);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: all 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #dc2626, #000000, #dc2626);
    background-size: 400% 400%;
    animation: borderGlow 3s ease-in-out infinite alternate;
    z-index: -1;
    margin: -2px;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.header:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
}

.header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff0000, #ffffff, #dc2626, #ff4444);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 2s ease-in-out infinite alternate;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

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

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 0, 0, 0.9) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    position: relative;
    padding: 30px;
    text-align: center;
    transition: all 0.2s ease;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(220, 38, 38, 0.8);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 0 20px currentColor;
    position: relative;
    z-index: 2;
}

.stat-label {
    color: #cccccc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.processed { 
    color: #dc2626; 
    text-shadow: 0 0 25px #dc2626;
}
.pending { 
    color: #ffffff; 
    text-shadow: 0 0 25px #ffffff;
}
.expired { 
    color: #7f1d1d; 
    text-shadow: 0 0 25px #7f1d1d;
}
.total { 
    color: #fca5a5; 
    text-shadow: 0 0 25px #fca5a5;
}

.trades-section {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(15, 0, 0, 0.9) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    position: relative;
    padding: 30px;
    margin-bottom: 25px;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    overflow: hidden;
}

.trades-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #dc2626, transparent, #dc2626);
    animation: redPulse 2s ease-in-out infinite alternate;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #dc2626, transparent);
}

.trades-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
}

.trades-table th,
.trades-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
    position: relative;
}

.trades-table th {
    background: 
        linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(220, 38, 38, 0.5);
}

.trades-table tr {
    transition: all 0.15s ease;
}

.trades-table tbody tr:hover {
    background: 
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
    transform: translateX(5px);
}

.trades-table tbody tr:hover td {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.trades-table td {
    color: #cccccc;
    font-weight: 500;
    font-size: 1rem;
}

.status-badge {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    transition: all 0.2s ease;
}

.status-badge::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.3s ease;
}

.status-badge:hover::before {
    left: 100%;
}

.status-processed {
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.status-pending {
    background: linear-gradient(135deg, #ffffff, #cccccc);
    color: #000000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.status-expired {
    background: linear-gradient(135deg, #7f1d1d, #450a0a);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(127, 29, 29, 0.4);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.btn {
    padding: 15px 30px;
    border: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    color: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.5);
}

.btn::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.3s ease;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(220, 38, 38, 0.4);
    border-color: rgba(220, 38, 38, 0.8);
}

.btn:active {
    transform: translateY(-1px);
}

.btn.secondary {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 0, 0, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #dc2626;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    animation: aggressive-pulse 1s ease-in-out infinite alternate;
    box-shadow: 0 0 15px #dc2626;
}

@keyframes aggressive-pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 15px #dc2626;
    }
    100% { 
        transform: scale(1.3);
        box-shadow: 0 0 25px #dc2626, 0 0 35px rgba(220, 38, 38, 0.5);
    }
}

@keyframes redPulse {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

.header img {
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5));
}

.chart-placeholder {
    height: 250px;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 0, 0, 0.4)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(220, 38, 38, 0.05) 10px,
            rgba(220, 38, 38, 0.05) 20px
        );
    border: 1px solid rgba(220, 38, 38, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: chartPulse 3s ease-in-out infinite;
}

@keyframes chartPulse {
    0%, 100% {
        width: 100px;
        height: 100px;
        opacity: 0.3;
    }
    50% {
        width: 200px;
        height: 200px;
        opacity: 0.1;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #dc2626, #7f1d1d);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* Selection Color */
::selection {
    background: rgba(220, 38, 38, 0.3);
    color: #ffffff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .trades-table {
        font-size: 0.85rem;
    }
    
    .trades-table th,
    .trades-table td {
        padding: 12px 15px;
    }
    
    .stat-value {
        font-size: 2.2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .trades-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .trades-table {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        gap: 10px;
    }
}