/* Breadcrumbs to Breach - CTF Scoreboard Styles */

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

body {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    border: 2px solid #00ff00;
    padding: 20px;
}

.header pre.ascii-art {
    color: #00ff00;
    font-size: 12px;
    line-height: 1.2;
    font-family: monospace;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
    text-align: left;
    display: inline-block;
}

.header h1 {
    color: #00ff00;
    margin-top: 15px;
    text-shadow: 0 0 10px #00ff00;
}

.header .subtitle {
    color: #666;
    margin-top: 5px;
}

.nav-links {
    text-align: center;
    margin-bottom: 20px;
}

.nav-links a {
    color: #00ff00;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 15px;
    border: 1px solid #00ff00;
}

.nav-links a:hover {
    background: #00ff00;
    color: #000;
}

.nav-links a.active {
    background: #00ff00;
    color: #000;
}

.columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.column {
    flex: 1;
    min-width: 350px;
}

.panel {
    border: 1px solid #00ff00;
    margin-bottom: 20px;
}

.panel-header {
    background: #003300;
    padding: 10px;
    border-bottom: 1px solid #00ff00;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header.shame {
    background: #330000;
    border-color: #ff0000;
}

.panel.shame {
    border-color: #ff0000;
}

.panel.shame .panel-header {
    color: #ff0000;
}

.panel-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #003300;
}

th {
    color: #00ff00;
    font-weight: bold;
}

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

.shame-entry {
    padding: 10px;
    border-bottom: 1px solid #330000;
    color: #ff6666;
}

.shame-entry:last-child {
    border-bottom: none;
}

.shame-handle {
    color: #ff0000;
    font-weight: bold;
}

.shame-message {
    color: #ff9999;
    font-style: italic;
    margin-top: 5px;
}

.shame-penalty {
    color: #ff0000;
    font-weight: bold;
    margin-left: 5px;
}

/* Repeat Offenders Panel */
.shame-rank {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #330000;
}

.shame-rank:last-child {
    border-bottom: none;
}

.shame-rank-handle {
    color: #ff6666;
}

.shame-rank-count {
    color: #ff0000;
    font-weight: bold;
}

.shame-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

.shame-badge.amateur { background: #330000; color: #ff9999; }
.shame-badge.repeat { background: #440000; color: #ffaaaa; }
.shame-badge.serial { background: #660000; color: #ffcccc; }

.negative-points {
    color: #ff0000 !important;
}

.recent-entry {
    padding: 8px;
    border-bottom: 1px solid #003300;
}

.recent-entry:last-child {
    border-bottom: none;
}

.timestamp {
    color: #666;
    font-size: 11px;
}

.points {
    color: #ffff00;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

.empty-message {
    color: #666;
    text-align: center;
    padding: 20px;
}

@media (max-width: 800px) {
    .columns {
        flex-direction: column;
    }
    .column {
        min-width: 100%;
    }
}

/* Flag Achievement Grid Styles */
.achievements-panel {
    margin-bottom: 20px;
}

.achievements-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discovery-count {
    font-size: 14px;
}

.flag-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
    padding: 20px 10px;
    max-width: 700px;
    margin: 0 auto;
}

.flag-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.flag-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
}

.flag-badge {
    width: 80px;
    height: 92px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    font-size: 32px;
}

.flag-badge.locked {
    filter: brightness(0.4) grayscale(1);
    border-color: #222;
    overflow: hidden;
    position: relative;
}

.flag-badge.locked .flag-icon {
    opacity: 0.3;
}

/* Gray shimmer for locked non-epic badges */
.flag-badge.locked:not(.epic)::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(100, 100, 100, 0.15) 45%,
        rgba(150, 150, 150, 0.25) 50%,
        rgba(100, 100, 100, 0.15) 55%,
        transparent 70%
    );
    animation: badge-shimmer 4s infinite linear;
    pointer-events: none;
}

/* Epic badges should show gold even when locked - override grayscale */
.flag-badge.epic.locked {
    filter: brightness(0.5);
    border-color: #8b7500;
    background: linear-gradient(180deg, #2a2000 0%, #1a1500 50%, #0f0a00 100%);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(139, 117, 0, 0.3);
}

.flag-badge.epic.locked .flag-icon {
    opacity: 0.5;
    color: #8b7500;
    text-shadow: 0 0 5px #8b7500;
}

/* Dimmed gold shimmer for locked epic badges */
.flag-badge.epic.locked::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(139, 117, 0, 0.15) 45%,
        rgba(180, 150, 50, 0.25) 50%,
        rgba(139, 117, 0, 0.15) 55%,
        transparent 70%
    );
    animation: epic-shimmer 4s infinite linear;
    pointer-events: none;
}

.flag-badge.unlocked {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Shimmer effect for ALL unlocked badges */
.flag-badge.unlocked::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 255, 0, 0.2) 45%,
        rgba(150, 255, 150, 0.4) 50%,
        rgba(0, 255, 0, 0.2) 55%,
        transparent 70%
    );
    animation: badge-shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes badge-shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Epic Badge - GOLDEN styling for high-value flags (100+ points) */
.flag-badge.epic {
    border-color: #ffd700 !important;
    background: linear-gradient(180deg, #3d2e00 0%, #2a2000 50%, #1a1500 100%) !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6),
                0 0 50px rgba(255, 170, 0, 0.4),
                inset 0 0 30px rgba(255, 215, 0, 0.2) !important;
    overflow: hidden;
    position: relative;
}

/* Golden shimmer for epic badges */
.flag-badge.epic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 215, 0, 0.3) 45%,
        rgba(255, 255, 200, 0.5) 50%,
        rgba(255, 215, 0, 0.3) 55%,
        transparent 70%
    );
    animation: epic-shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes epic-shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.flag-badge.epic .flag-icon {
    color: #ffd700;
    text-shadow: 0 0 15px #ffd700, 0 0 25px #ffaa00;
}

.flag-badge.epic.unlocked {
    border-color: #ffd700;
    animation: epic-glow 2s ease-in-out infinite alternate;
}

@keyframes epic-glow {
    0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 170, 0, 0.3); }
    100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.7), 0 0 60px rgba(255, 170, 0, 0.5); }
}

.flag-icon {
    font-size: 32px;
    text-shadow: 0 0 10px currentColor;
}

.flag-icon.locked {
    color: #333;
    font-size: 28px;
}

.flag-info {
    margin-top: 10px;
    text-align: center;
    max-width: 120px;
}

.first-finder {
    color: #00ff00;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.flag-blurb {
    color: #888;
    font-size: 12px;
    font-style: italic;
    line-height: 1.3;
    margin-top: 4px;
}

/* Flame Reveal Animation */
@keyframes flame-reveal {
    0% {
        filter: brightness(0.4) grayscale(1);
        transform: scale(0.9);
    }
    15% {
        filter: brightness(2.5) hue-rotate(-30deg) saturate(2);
        transform: scale(1.15);
        box-shadow: 0 0 40px #ff6600, 0 0 60px #ff3300, 0 0 80px #ff0000;
    }
    30% {
        filter: brightness(2) hue-rotate(-20deg) saturate(1.5);
        box-shadow: 0 0 35px #ff7700, 0 0 50px #ff4400;
    }
    50% {
        filter: brightness(1.5) hue-rotate(-10deg);
        box-shadow: 0 0 25px #ff9900, 0 0 40px #ff6600;
    }
    70% {
        filter: brightness(1.2) hue-rotate(-5deg);
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    }
    100% {
        filter: brightness(1) hue-rotate(0deg);
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    }
}

.flag-badge.just-unlocked {
    animation: flame-reveal 2s ease-out forwards;
}

/* Flame Particles */
@keyframes flame-particle-1 {
    0% { opacity: 1; transform: translateY(0) translateX(0) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) translateX(-15px) scale(0.3); }
}

@keyframes flame-particle-2 {
    0% { opacity: 1; transform: translateY(0) translateX(0) scale(1); }
    100% { opacity: 0; transform: translateY(-55px) translateX(10px) scale(0.4); }
}

.flag-badge.just-unlocked::before,
.flag-badge.just-unlocked::after {
    content: '🔥';
    position: absolute;
    font-size: 18px;
    pointer-events: none;
}

.flag-badge.just-unlocked::before {
    animation: flame-particle-1 1.5s ease-out forwards;
    left: 5px;
    top: 10px;
}

.flag-badge.just-unlocked::after {
    animation: flame-particle-2 1.5s ease-out 0.2s forwards;
    right: 5px;
    top: 15px;
}

@media (max-width: 700px) {
    .flag-row {
        gap: 15px;
    }
    .flag-slot {
        width: 90px;
    }
    .flag-badge {
        width: 60px;
        height: 69px;
        font-size: 24px;
    }
    .flag-icon {
        font-size: 24px;
    }
    .first-finder {
        font-size: 11px;
    }
    .flag-blurb {
        font-size: 10px;
    }
}

@media (max-width: 500px) {
    .flag-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .flag-slot {
        width: 70px;
    }
    .flag-badge {
        width: 50px;
        height: 58px;
        font-size: 20px;
    }
    .flag-icon {
        font-size: 20px;
    }
    .first-finder {
        font-size: 10px;
    }
    .flag-blurb {
        font-size: 9px;
    }
}

/* Shame Anti-Achievements */
.shame-achievements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 15px;
}

.shame-achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.shame-achievement-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    overflow: hidden;
}

/* Unlocked shame badges */
.shame-achievement-badge.unlocked {
    background: linear-gradient(180deg, #330000 0%, #1a0000 100%);
    border: 2px solid #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4),
                inset 0 0 20px rgba(255, 0, 0, 0.1);
}

.shame-achievement-badge.unlocked::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 0, 0, 0.2) 45%,
        rgba(255, 100, 100, 0.4) 50%,
        rgba(255, 0, 0, 0.2) 55%,
        transparent 70%
    );
    animation: shame-shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes shame-shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Locked shame badges */
.shame-achievement-badge.locked {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #333;
    filter: brightness(0.4) grayscale(1);
}

.shame-achievement-badge.locked .shame-icon {
    opacity: 0.3;
}

.shame-icon {
    font-size: 28px;
}

.shame-achievement-info {
    margin-top: 8px;
    text-align: center;
}

.shame-achievement-name {
    color: #ff6666;
    font-size: 11px;
    font-weight: bold;
}

.shame-achievement-holder {
    color: #ff0000;
    font-size: 10px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.shame-achievement-desc {
    color: #993333;
    font-size: 9px;
    font-style: italic;
    margin-top: 2px;
}

/* Special "legendary" shame badge */
.shame-achievement-badge.legendary {
    border-color: #ff6600 !important;
    background: linear-gradient(180deg, #331a00 0%, #1a0d00 100%) !important;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.5),
                inset 0 0 20px rgba(255, 102, 0, 0.2) !important;
}

.shame-achievement-badge.legendary::before {
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 102, 0, 0.3) 45%,
        rgba(255, 200, 100, 0.5) 50%,
        rgba(255, 102, 0, 0.3) 55%,
        transparent 70%
    ) !important;
}

.shame-achievement-badge.legendary + .shame-achievement-info .shame-achievement-name {
    color: #ff6600;
}

@media (max-width: 500px) {
    .shame-achievements {
        gap: 10px;
    }
    .shame-achievement {
        width: 80px;
    }
    .shame-achievement-badge {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .shame-icon {
        font-size: 24px;
    }
}
