/* 
 * roadmap.css - UPDATED v4.0
 * TACTICAL ROADMAP THEME · COMPLETE SOCIAL PLATFORM ROADMAP
 * MOBILE OPTIMIZED · THEME SWITCHING · R-CORP ACCOUNTABILITY
 * 
 * THEMES: BLOOD (default), MIDNIGHT, FOREST, AMBER
 * FILE: css/roadmap.css
 */

:root {
    /* BLOOD THEME (DEFAULT) */
    --blood-red: #ff0000;
    --deep-red: #8b0000;
    --void-black: #0a0a0a;
    --text-grey: #dddddd;
    --dim-grey: #777777;
    --parchment: #1a1a1a;
    --grid-color: rgba(180, 0, 0, 0.25);
    --fold-shadow: rgba(0, 0, 0, 0.8);
    --accent-glow: rgba(255, 0, 0, 0.3);
    --success-green: #00aa00;
    --warning-amber: #ffaa00;
    --info-blue: #5555ff;
    --phase-header-bg: var(--deep-red);
    --phase-header-text: #eeeeee;
    --border-color: #3a1a1a;
    --card-bg: rgba(10, 10, 10, 0.92);
    --hover-highlight: #ff7777;
}

/* MIDNIGHT THEME - COVERT OPS */
[data-theme="midnight"] {
    --blood-red: #3366ff;
    --deep-red: #1a3a6b;
    --void-black: #0a0a1a;
    --text-grey: #ccccff;
    --dim-grey: #666699;
    --grid-color: rgba(51, 102, 255, 0.2);
    --accent-glow: rgba(51, 102, 255, 0.3);
    --phase-header-bg: #1a3a6b;
    --phase-header-text: #ffffff;
    --border-color: #1a3a6b;
    --card-bg: rgba(8, 8, 20, 0.95);
    --hover-highlight: #88aaff;
}

/* FOREST THEME - RESISTANCE */
[data-theme="forest"] {
    --blood-red: #33aa33;
    --deep-red: #1a6b1a;
    --void-black: #0a1a0a;
    --text-grey: #ccddcc;
    --dim-grey: #668866;
    --grid-color: rgba(51, 170, 51, 0.2);
    --accent-glow: rgba(51, 170, 51, 0.3);
    --phase-header-bg: #1a6b1a;
    --phase-header-text: #ffffff;
    --border-color: #1a6b1a;
    --card-bg: rgba(10, 20, 10, 0.95);
    --hover-highlight: #aaffaa;
}

/* AMBER THEME - TACTICAL */
[data-theme="amber"] {
    --blood-red: #ffaa33;
    --deep-red: #aa6b1a;
    --void-black: #1a1a0a;
    --text-grey: #ffddbb;
    --dim-grey: #aa8866;
    --grid-color: rgba(255, 170, 51, 0.25);
    --accent-glow: rgba(255, 170, 51, 0.3);
    --phase-header-bg: #aa6b1a;
    --phase-header-text: #000000;
    --border-color: #aa6b1a;
    --card-bg: rgba(20, 15, 10, 0.95);
    --hover-highlight: #ffcc88;
}

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

body {
    background-color: var(--void-black);
    color: var(--text-grey);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 16px;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px, 30px 30px;
    background-position: center center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.2s ease;
}

.roadmap-container {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
    border: 1px solid var(--border-color);
    padding: clamp(20px, 5vw, 40px);
    background: var(--card-bg);
    box-shadow:
        12px 12px 0 rgba(139, 0, 0, 0.2),
        0 0 0 1px var(--deep-red) inset,
        0 0 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

/* ========== THEME CONTROLS ========== */
.theme-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--deep-red);
}

.theme-btn {
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-grey);
    border: 1px solid var(--deep-red);
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.theme-btn:hover {
    background: var(--deep-red);
    color: var(--void-black);
    border-color: white;
    box-shadow: 3px 3px 0 var(--deep-red);
}

.theme-btn.active {
    background: var(--blood-red);
    color: black;
    border-color: white;
    box-shadow: 3px 3px 0 var(--deep-red);
}

/* ========== HEADER WITH PROGRESS ========== */
.header-with-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 3px double var(--deep-red);
    padding-bottom: 15px;
}

h1 {
    color: var(--blood-red);
    text-transform: uppercase;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    letter-spacing: 3px;
    word-break: break-word;
    text-shadow: 2px 2px 0 #300000;
    font-weight: 900;
    margin: 0;
    flex: 1;
}

.progress-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-left: 4px solid var(--deep-red);
    flex-wrap: wrap;
}

.progress-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-grey);
}

.progress-bar {
    width: 120px;
    height: 12px;
    background: #1a1a1a;
    border: 1px solid var(--deep-red);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--blood-red);
    width: 42%;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 1rem;
    font-weight: bold;
    color: var(--blood-red);
}

/* ========== MAP CORNER FOLDS ========== */
.map-corner {
    position: absolute;
    width: clamp(16px, 4vw, 25px);
    height: clamp(16px, 4vw, 25px);
    border-style: solid;
    border-color: var(--deep-red) transparent transparent var(--deep-red);
    opacity: 0.6;
    pointer-events: none;
    z-index: 5;
}

.top-left {
    top: -1px;
    left: -1px;
    border-width: 8px 0 0 8px;
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.5);
}

.top-right {
    top: -1px;
    right: -1px;
    border-width: 8px 8px 0 0;
    border-color: var(--deep-red) var(--deep-red) transparent transparent;
    box-shadow: 2px -2px 5px rgba(0, 0, 0, 0.5);
}

.bottom-left {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent var(--deep-red) var(--deep-red);
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.5);
}

.bottom-right {
    bottom: -1px;
    right: -1px;
    border-width: 0 8px 8px 0;
    border-color: transparent var(--deep-red) var(--deep-red) transparent;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* ========== PHASE STYLES ========== */
.phase {
    margin: 45px 0;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--blood-red);
    background: linear-gradient(to right, var(--accent-glow), transparent);
    transition: border-color 0.3s ease;
}

.phase-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: var(--phase-header-bg);
    color: var(--phase-header-text);
    display: inline-flex;
    padding: 8px 20px;
    font-weight: 900;
    font-size: clamp(1rem, 4vw, 1.2rem);
    text-transform: uppercase;
    transform: rotate(-0.5deg);
    margin-bottom: 25px;
    border: 1px solid var(--blood-red);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.phase-number {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 0;
}

.phase-title {
    flex: 1;
}

.phase-status {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 10px;
    letter-spacing: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 4vw, 1.05rem);
    display: flex;
    align-items: flex-start;
    border-bottom: 1px dashed rgba(139, 0, 0, 0.2);
    padding-bottom: 10px;
    line-height: 1.5;
    transition: color 0.2s ease;
}

li::before {
    content: "◉";
    color: var(--blood-red);
    margin-right: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 0 8px var(--blood-red);
    flex-shrink: 0;
}

li.completed {
    color: var(--dim-grey);
    text-decoration: line-through;
    text-decoration-color: var(--deep-red);
}

li.completed::before {
    content: "✓";
    color: var(--success-green);
    text-shadow: 0 0 5px var(--success-green);
    transform: none;
}

/* ========== TRACKER PANEL ========== */
.tracker-panel {
    margin: 50px 0 30px;
    border: 2px solid var(--deep-red);
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
}

.tracker-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tracker-icon {
    font-size: 1.5rem;
    color: var(--blood-red);
}

.tracker-title {
    color: var(--blood-red);
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

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

.tracker-category {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-left: 4px solid var(--deep-red);
}

.category-name {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-grey);
    margin-bottom: 5px;
}

.category-progress {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--blood-red);
    margin-bottom: 8px;
}

.category-bar {
    width: 100%;
    height: 8px;
    background: #1a1a1a;
    border: 1px solid var(--deep-red);
}

.category-bar div {
    height: 100%;
    background: var(--blood-red);
    width: 0%;
}

.tracker-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px dashed var(--deep-red);
    color: var(--dim-grey);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* ========== MILESTONE PANEL ========== */
.milestone-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--warning-amber);
    padding: 15px 25px;
    margin: 30px 0;
    border-left: 10px solid var(--warning-amber);
}

.milestone-icon {
    font-size: 2rem;
    color: var(--warning-amber);
}

.milestone-content {
    flex: 1;
}

.milestone-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--dim-grey);
    display: block;
    margin-bottom: 5px;
}

.milestone-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--warning-amber);
    text-transform: uppercase;
}

.milestone-deadline {
    background: var(--warning-amber);
    color: black;
    padding: 6px 16px;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

/* ========== MAP LEGEND ========== */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--deep-red);
    justify-content: space-around;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legend-marker {
    font-size: 1.1rem;
    color: var(--blood-red);
}

.completed-marker {
    color: var(--success-green);
}

.pending-marker {
    color: var(--dim-grey);
}

.doctrine-marker {
    color: var(--blood-red);
    font-size: 1.1rem;
}

/* ========== FOOTER NAVIGATION ========== */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 2px dotted var(--deep-red);
    gap: 20px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.back-btn {
    display: inline-block;
    color: var(--blood-red);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid var(--blood-red);
    background: rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
    font-size: 0.8rem;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--blood-red);
    color: black;
    border-color: white;
    box-shadow: 5px 5px 0 var(--deep-red);
}

.map-coordinates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--dim-grey);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-left: 4px solid var(--deep-red);
}

.coordinate-doctrine {
    color: var(--blood-red);
    font-weight: bold;
}

.coordinate-timestamp {
    font-family: monospace;
}

/* ========== RESPONSIVE: TABLET ========== */
@media (max-width: 768px) {
    body {
        padding: 12px;
        background-size: 25px 25px, 25px 25px;
    }

    .roadmap-container {
        padding: 20px;
        margin: 10px auto;
        box-shadow: 8px 8px 0 rgba(139, 0, 0, 0.3);
    }

    .theme-controls {
        justify-content: center;
    }

    .theme-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .header-with-metrics {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .progress-compact {
        width: 100%;
        justify-content: space-between;
    }

    .progress-bar {
        width: 100px;
    }

    .phase-header {
        flex-wrap: wrap;
        padding: 6px 15px;
    }

    .phase-status {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .map-coordinates {
        width: 100%;
        justify-content: center;
    }
}

/* ========== RESPONSIVE: MOBILE ========== */
@media (max-width: 480px) {
    body {
        padding: 8px;
        background-size: 20px 20px, 20px 20px;
    }

    .roadmap-container {
        padding: 16px;
        margin: 5px;
        box-shadow: 6px 6px 0 rgba(139, 0, 0, 0.4);
    }

    .theme-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .theme-btn {
        width: 100%;
        text-align: center;
        padding: 10px 5px;
        font-size: 0.7rem;
    }

    .phase {
        padding-left: 12px;
        margin: 35px 0;
    }

    .phase-header {
        transform: none;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .phase-number {
        font-size: 0.9rem;
    }

    .phase-title {
        font-size: 1rem;
        word-break: break-word;
    }

    li {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    li::before {
        margin-right: 10px;
        font-size: 1rem;
    }

    .tracker-grid {
        grid-template-columns: 1fr;
    }

    .milestone-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        flex-direction: column;
    }

    .back-btn {
        width: 100%;
        text-align: center;
    }

    .map-coordinates {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .map-corner {
        width: 14px;
        height: 14px;
        border-width: 4px;
    }
}

/* ========== EXTRA SMALL ========== */
@media (max-width: 360px) {
    .roadmap-container {
        padding: 12px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .progress-compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-bar {
        width: 100%;
    }

    .theme-controls {
        grid-template-columns: 1fr;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .roadmap-container {
        margin: 10px;
        padding: 15px;
    }

    .phase {
        margin: 25px 0;
    }

    .footer-nav {
        margin-top: 30px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    .theme-controls,
    .back-btn,
    .map-corner {
        display: none !important;
    }

    .roadmap-container {
        box-shadow: none;
        border: 1px solid #333;
    }
}