/* --- WEEKLY OPS MODAL STYLING --- */

/* The Container */
.weekly-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* SECTION 1: MISSION LIST */
.mission-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mission-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Status: Complete */
.mission-card.done {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

.mission-card.done::after {
    content: "✓";
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    font-weight: 900;
    color: #22c55e;
    filter: drop-shadow(0 0 5px #22c55e);
}

.m-icon { font-size: 1.8rem; }

.m-info { flex: 1; z-index: 2; }

.m-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.m-title {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.m-progress-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #94a3b8;
}

.m-desc {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

/* Progress Bar (Slim) */
.m-bar-bg {
    width: 100%;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
    overflow: hidden;
}

.m-bar-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px #3b82f6;
}
.mission-card.done .m-bar-fill { background: #22c55e; box-shadow: 0 0 8px #22c55e; }


/* SECTION 2: REWARD TRACK */
.reward-section {
    margin-top: 10px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 20px;
    position: relative;
}

.reward-header {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.reward-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

/* Connecting Line */
.track-line {
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #334155;
    z-index: 0;
    transform: translateY(-50%);
    border-radius: 4px;
}

.track-fill {
    height: 100%;
    background: #fbbf24;
    width: 0%; /* JS updates this */
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    border-radius: 4px;
}

/* Crate Nodes */
.crate-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
    transition: transform 0.2s;
}

.crate-icon {
    width: 50px;
    height: 50px;
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    color: #64748b;
}

.crate-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

/* STATES */
/* Locked but reachable (next in line) */
.crate-node.locked .crate-icon { opacity: 0.6; }

/* Unlocked (Ready to Claim) */
.crate-node.unlocked { cursor: pointer; }
.crate-node.unlocked .crate-icon {
    background: #fbbf24;
    border-color: #fff;
    color: #451a03;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: bounce-ready 2s infinite;
}
.crate-node.unlocked .crate-label { color: #fbbf24; }

/* Claimed */
.crate-node.claimed .crate-icon {
    background: #0f172a;
    border-color: #22c55e;
    color: #22c55e;
    filter: grayscale(100%);
    opacity: 0.5;
}
.crate-node.claimed::after {
    content: "✔";
    position: absolute;
    top: -5px; right: -5px;
    background: #22c55e;
    color: black;
    font-size: 0.7rem;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

@keyframes bounce-ready {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-6px);}
    60% {transform: translateY(-3px);}
}

/* --- CRATE ANIMATIONS --- */

/* 1. The Suspense Shake */
@keyframes shake-crate {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-5px, 5px) rotate(-5deg); }
    50% { transform: translate(5px, -5px) rotate(5deg); }
    75% { transform: translate(-5px, -5px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.crate-shaking {
    display: inline-block;
    font-size: 5rem;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.4));
    animation: shake-crate 0.1s infinite; /* Violent speed */
}

/* 2. The Reveal Pop */
@keyframes pop-loot {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

.loot-reveal-icon {
    display: inline-block;
    font-size: 4rem;
    animation: pop-loot 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Optional: Hide the "Close" button during the shaking phase if possible */
.modal-locked .modal-close-btn {
    display: none;
}