/* YARA Forge Main Stylesheet */
/* /home/jester/sites/Yara/css/style.css */

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

:root {
    --coal:      #0d0c0b;
    --iron:      #1a1917;
    --steel:     #2e2c28;
    --rust:      #8b3a1e;
    --ember:     #c94b1a;
    --fire:      #e8761a;
    --glow:      #f4a942;
    --ash:       #b0a898;
    --parchment: #e8dfc8;
    --smoke:     rgba(255,255,255,0.04);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-size: 1.4em;
}

body {
    background: var(--coal);
    color: var(--parchment);
    font-family: 'Crimson Pro', serif;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(201,75,26,.35) 0%, transparent 70%),
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(139,58,30,.2) 0%, transparent 65%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.012) 2px, rgba(255,255,255,.012) 4px);
    pointer-events: none;
    z-index: 0;
}

.embers {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ember {
    position: absolute;
    bottom: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 6px 2px var(--fire);
    animation: rise linear infinite;
    opacity: 0;
}

.ember:nth-child(1)  { left: 12%; animation-duration: 6s;   animation-delay: 0s; }
.ember:nth-child(2)  { left: 22%; animation-duration: 8s;   animation-delay: 1s; width: 2px; height: 2px; }
.ember:nth-child(3)  { left: 35%; animation-duration: 5s;   animation-delay: .7s; width: 4px; height: 4px; }
.ember:nth-child(4)  { left: 48%; animation-duration: 9s;   animation-delay: 2s; }
.ember:nth-child(5)  { left: 58%; animation-duration: 7s;   animation-delay: 1.2s; }
.ember:nth-child(6)  { left: 69%; animation-duration: 6.5s; animation-delay: 4s; }
.ember:nth-child(7)  { left: 81%; animation-duration: 10s;  animation-delay: 2.4s; width: 2px; height: 2px; }
.ember:nth-child(8)  { left: 91%; animation-duration: 7.5s; animation-delay: .3s; }
.ember:nth-child(9)  { left: 5%;  animation-duration: 11s;  animation-delay: 3.1s; width: 2px; height: 2px; }
.ember:nth-child(10) { left: 72%; animation-duration: 5.8s; animation-delay: 1.8s; width: 3px; height: 3px; }
.ember:nth-child(11) { left: 45%; animation-duration: 7.2s; animation-delay: 5s; width: 2px; height: 2px; }
.ember:nth-child(12) { left: 63%; animation-duration: 9.5s; animation-delay: 2.7s; }
.ember:nth-child(13) { left: 33%; animation-duration: 8.3s; animation-delay: 0.9s; }

@keyframes rise {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: .6; }
    100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

.app-wrapper {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-menu {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, rgba(26,25,23,.98), rgba(13,12,11,.96));
    border-bottom: 1px solid rgba(232,118,26,.2);
    box-shadow: 0 4px 20px rgba(0,0,0,.45), inset 0 -1px 0 rgba(255,255,255,.03);
    backdrop-filter: blur(10px);
}

.logo {
    margin-right: auto;
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--glow) 0%, var(--fire) 50%, var(--ash) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-menu a {
    padding: 0.5rem 1rem;
    color: var(--ash);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: background .25s, color .25s, border-color .25s, transform .15s;
    white-space: nowrap;
}

.top-menu a:hover {
    color: var(--parchment);
    background: rgba(232,118,26,.08);
    border-color: rgba(232,118,26,.25);
    transform: translateY(-1px);
}

.top-menu .logout-btn {
    background: linear-gradient(135deg, rgba(139,58,30,.25), rgba(201,75,26,.18));
    border-color: rgba(232,118,26,.2) !important;
}

.body-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.left-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(13,12,11,.96), rgba(26,25,23,.94));
    border-right: 1px solid rgba(232,118,26,.2);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.left-sidebar::-webkit-scrollbar {
    width: 4px;
}
.left-sidebar::-webkit-scrollbar-track {
    background: var(--coal);
}
.left-sidebar::-webkit-scrollbar-thumb {
    background: var(--rust);
    border-radius: 4px;
}

.sidebar-header {
    padding: 1.8rem 1.2rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(232,118,26,.15);
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--glow);
    text-transform: uppercase;
}

.sidebar-header p {
    font-size: 0.7rem;
    color: var(--ash);
    margin-top: 0.4rem;
}

.nav-menu {
    flex: 1;
    padding: 0 0.5rem 1.5rem 0.5rem;
}

.nav-category {
    padding: 0.5rem 1rem 0.3rem 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--rust);
    text-transform: uppercase;
}

.nav-item {
    display: block;
    padding: 0.7rem 1rem;
    margin: 0.2rem 0;
    color: var(--ash);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--glow);
    background: rgba(232,118,26,.08);
    border-left-color: var(--fire);
}

.nav-item.active {
    color: var(--fire);
    border-left-color: var(--fire);
    background: rgba(232,118,26,.12);
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232,118,26,.2), transparent);
    margin: 0.8rem 0.8rem;
}

.progress-placeholder {
    margin: 1rem;
    padding: 0.8rem;
    background: rgba(255,255,255,.03);
    border: 1px dashed rgba(232,118,26,.25);
    border-radius: 4px;
}

.progress-header {
    font-size: 0.65rem;
    font-family: 'Cinzel', serif;
    color: var(--ash);
    margin-bottom: 0.5rem;
}

.progress-bar-placeholder {
    height: 4px;
    background: var(--steel);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--fire);
    border-radius: 2px;
}

.progress-text {
    font-size: 0.55rem;
    color: var(--ash);
    margin-top: 0.4rem;
}

.progress-note {
    font-size: 0.5rem;
    color: rgba(176,168,152,.4);
    margin-top: 0.3rem;
    font-style: italic;
}

.sidebar-footer {
    padding: 1rem 1.2rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(232,118,26,.1);
    font-size: 0.6rem;
    color: rgba(176,168,152,.4);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.1em;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 1.5rem;
    background: rgba(13,12,11,.4);
}

.main-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.main-content::-webkit-scrollbar-track {
    background: var(--iron);
}
.main-content::-webkit-scrollbar-thumb {
    background: var(--rust);
    border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--fire);
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;
}

.yara-image {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,118,26,.2);
    border-radius: 4px;
}

/* Content Page Styles */
.content-page {
    max-width: 1100px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(232,118,26,.2);
    padding-bottom: 1rem;
}

.page-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--glow);
    letter-spacing: 0.05em;
}

.page-header .breadcrumb {
    font-size: 0.7rem;
    color: var(--ash);
    margin-top: 0.5rem;
}

.learning-section {
    background: rgba(255,255,255,.02);
    border-left: 3px solid var(--fire);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.learning-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--parchment);
    margin-bottom: 0.8rem;
}

.outline-list {
    list-style: none;
    padding-left: 0;
}

.outline-list li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(232,118,26,.1);
}

.outline-list li strong {
    color: var(--glow);
}

.resource-list {
    list-style: none;
    padding-left: 0;
}

.resource-list li {
    padding: 0.3rem 0;
}

.resource-list a {
    color: var(--fire);
    text-decoration: none;
    transition: color 0.2s;
}

.resource-list a:hover {
    color: var(--glow);
    text-decoration: underline;
}

.placeholder-box {
    background: rgba(139,58,30,.1);
    border: 1px dashed rgba(232,118,26,.3);
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--ash);
    font-style: italic;
}

.mastery-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(232,118,26,.15);
    border-radius: 20px;
    font-size: 0.7rem;
    font-family: 'Cinzel', serif;
    color: var(--glow);
}

@media (max-width: 780px) {
    .left-sidebar {
        width: 220px;
    }
    .top-menu a {
        font-size: 0.55rem;
        padding: 0.4rem 0.7rem;
    }
    .logo h1 {
        font-size: 0.8rem;
    }
    .page-header h1 {
        font-size: 1.3rem;
    }
}

@media (max-width: 600px) {
    .left-sidebar {
        width: 180px;
    }
    .nav-item {
        font-size: 0.6rem;
        padding: 0.5rem 0.7rem;
    }
}

.wordmark {
    position: fixed;
    bottom: 0.5rem;
    right: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: rgba(176,168,152,.2);
    z-index: 3;
    pointer-events: none;
}