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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    color: #00ff41;
    min-height: 100vh;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 2px solid #00ff41;
    margin-bottom: 30px;
    background: rgba(0, 255, 65, 0.05);
}

.header h1 {
    font-size: 48px;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.tagline {
    font-size: 16px;
    color: #00cc33;
    margin-bottom: 15px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    border-radius: 20px;
    font-size: 14px;
    color: #ff0000;
    font-weight: bold;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.3);
}

.stat-value {
    font-size: 48px;
    font-weight: bold;
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41;
}

.stat-label {
    font-size: 14px;
    color: #00cc33;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sections */
.section {
    background: rgba(0, 255, 65, 0.03);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px #00ff41;
    border-bottom: 1px solid #00ff41;
    padding-bottom: 10px;
    transition: color 0.3s;
}

.section h2[onclick] {
    cursor: pointer;
    user-select: none;
}

.section h2[onclick]:hover {
    color: #00cc33;
    text-shadow: 0 0 10px #00cc33;
}

/* Info Grid */
.info-grid {
    column-count: 3;
    column-gap: 15px;
}

@media (max-width: 1200px) {
    .info-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .info-grid {
        column-count: 1;
    }
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ff41;
    border-radius: 5px;
    min-height: 64px;
    break-inside: avoid;
    margin-bottom: 15px;
}

.info-label {
    font-weight: bold;
    color: #00cc33;
    flex-shrink: 0;
    min-width: 150px;
}

.info-value {
    color: #00ff41;
    font-family: monospace;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: right;
    flex: 1;
    max-width: 100%;
}

/* Fingerprint Data */
.fingerprint-data {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

details {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00ff41;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
}

summary {
    font-weight: bold;
    color: #00ff41;
    cursor: pointer;
    user-select: none;
}

summary:hover {
    color: #00cc33;
}

.fingerprint-content {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#canvasPreview {
    border: 1px solid #00ff41;
    background: white;
}

pre, code {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
}

/* Session History */
.session-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.session-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ff41;
    border-radius: 5px;
    transition: all 0.3s;
}

.session-stat-item:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(5px);
}

.session-label {
    font-weight: bold;
    color: #00cc33;
    font-size: 14px;
}

.session-value {
    color: #00ff41;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff41;
}

/* Visitor Leaderboard */
.leaderboard-section {
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.leaderboard-divider {
    color: #00ff41;
    text-align: center;
    margin: 15px 0;
    font-size: 12px;
    opacity: 0.5;
}

.your-rank-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    border-radius: 10px;
    margin: 20px 0;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
        border-color: #ff0000;
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
        border-color: #ff3333;
    }
}

.your-rank-badge {
    background: #ff0000;
    color: #fff;
    padding: 15px 25px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    text-shadow: 0 0 10px #000;
    animation: pulse 1.5s infinite;
}

.your-rank-details {
    flex: 1;
}

.rank-position {
    font-size: 20px;
    color: #ff0000;
    font-weight: bold;
    margin-bottom: 10px;
}

.rank-number {
    font-size: 28px;
    color: #ff3333;
    text-shadow: 0 0 10px #ff0000;
}

.visit-count {
    color: #ff6666;
    font-size: 24px;
}

.active-badge {
    background: rgba(255, 165, 0, 0.2);
    color: #ffaa00;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    margin-left: 10px;
    border: 1px solid #ffaa00;
}

.rank-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.rank-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6666);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.rank-streak {
    color: #ffaa00;
    font-size: 14px;
    margin-top: 5px;
}

.leaderboard-table {
    margin: 20px 0;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    border-radius: 8px;
    font-weight: bold;
    color: #00ff41;
    margin-bottom: 10px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid #00ff41;
    border-radius: 8px;
    transition: all 0.3s;
}

.leaderboard-entry:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(5px);
}

.leaderboard-entry.is-you {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.entry-rank {
    font-size: 24px;
    font-weight: bold;
    color: #00ff41;
    display: flex;
    align-items: center;
}

.entry-rank.top-1 { color: #ffd700; }
.entry-rank.top-2 { color: #c0c0c0; }
.entry-rank.top-3 { color: #cd7f32; }

.crown-icon {
    margin-left: 5px;
}

.entry-visitor {
    color: #00cc33;
    font-family: monospace;
    display: flex;
    align-items: center;
}

.entry-visits {
    color: #00ff41;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.entry-bar-container {
    display: flex;
    align-items: center;
}

.entry-bar {
    height: 10px;
    background: linear-gradient(90deg, #00ff41, #00cc33);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.loading-message {
    text-align: center;
    color: #00cc33;
    padding: 40px;
    font-size: 16px;
}

.global-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #00ff41;
}

.global-stat {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ff41;
    border-radius: 5px;
}

.global-label {
    color: #00cc33;
    font-weight: bold;
}

.global-value {
    color: #00ff41;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
}

/* Webcam Feed */
.webcam-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#webcamFeed {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 600px;
    border: 3px solid #ff0000;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.webcam-status {
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    border-radius: 5px;
    width: 100%;
    max-width: 100%;
}

.webcam-info {
    color: #00cc33;
    font-size: 12px;
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 2px solid #00ff41;
    color: #00cc33;
}

.footer p {
    margin: 5px 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

/* Responsive - Tablet (1024px and below) */
@media (max-width: 1024px) {
    body {
        padding: 15px;
    }

    .header h1 {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .tagline {
        font-size: 14px;
    }

    .section {
        padding: 20px;
    }

    .stat-value {
        font-size: 40px;
    }

    .info-label {
        min-width: 120px;
        font-size: 14px;
    }

    .info-value {
        font-size: 14px;
    }
}

/* Responsive - Mobile (768px and below) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .tagline {
        font-size: 13px;
    }

    .status {
        font-size: 12px;
        padding: 6px 12px;
    }

    .section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .section h2 {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 36px;
    }

    .stat-label {
        font-size: 12px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: auto;
        padding: 10px;
    }

    .info-label {
        min-width: auto;
        font-size: 13px;
    }

    .info-value {
        text-align: left;
        font-size: 13px;
        width: 100%;
    }

    .session-stats {
        grid-template-columns: 1fr;
    }

    .your-rank-container {
        flex-direction: column;
        text-align: center;
    }

    .leaderboard-header, .leaderboard-entry {
        grid-template-columns: 60px 1fr 80px;
        font-size: 12px;
    }

    .header-bar, .entry-bar-container {
        display: none;
    }

    #webcamFeed {
        min-height: 300px;
    }

    pre, code {
        font-size: 10px;
        overflow-x: scroll;
    }
}

/* Responsive - Small Mobile (480px and below) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 24px;
    }

    .tagline {
        font-size: 12px;
    }

    .section h2 {
        font-size: 18px;
    }

    .stat-value {
        font-size: 32px;
    }

    .info-label {
        font-size: 12px;
    }

    .info-value {
        font-size: 12px;
    }

    #webcamFeed {
        min-height: 200px;
    }
}
