/* blog_styles.css */
:root {
    --brut-bg: #1a1a1a;
    --brut-text: #f0f0f0;
    --brut-primary: #00E18D;
    --brut-secondary: #ff00ff;
    --brut-border: 2px solid #333;
    --brut-border-active: 2px solid var(--brut-primary);
    --window-bg: #222;
    --brut-window-bg: #222;
    --grid-color: rgba(255, 255, 255, 0.1);
    --hero-color: #f0f0f0;
    /* Light white as requested */
}

.hero-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15vw;
    /* Massive */
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-weight: 900;
    color: var(--hero-color);
    z-index: 1;
    /* Above background, below windows (windows are 9000+) */
    pointer-events: none;
    /* Click-through */
    white-space: nowrap;
    letter-spacing: -5px;
    text-transform: uppercase;
    mix-blend-mode: hard-light;
    /* Optional blend effect */
    opacity: 0.15;
}

/* Container for the entire blog overlay */
#blog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10001;
    /* Must be below Trigger but above content normally... Wait, Trigger needs to be clickable. */
    z-index: 9000;
    pointer-events: none;
    /* Let clicks pass through to site unless hitting a window */
    font-family: 'Courier New', Courier, monospace;
    display: block;
    /* Visible by default for public view */
}

/* Ensure Windows are above overlay */
.brut-window {
    z-index: 9001;
    /* Base z-index for windows */
}

#blog-overlay.active {
    display: block;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4);
    /* Slight dim */
}

/* Grid Background Effect when active (optional) */
#blog-overlay.active::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* --- LOGIN MODAL --- */
.brut-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border: 4px solid var(--brut-primary);
    padding: 2rem;
    color: var(--brut-primary);
    text-transform: uppercase;
    box-shadow: 10px 10px 0px rgba(0, 225, 141, 0.3);
    z-index: 10000;
}

.brut-input {
    background: #111;
    border: 2px solid #555;
    color: #fff;
    padding: 10px;
    font-family: inherit;
    font-size: 1.2rem;
    margin-top: 10px;
    width: 100%;
}

.brut-input:focus {
    outline: none;
    border-color: var(--brut-primary);
}

.brut-btn {
    background: var(--brut-primary);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    transition: transform 0.1s;
}

.brut-btn:active {
    transform: translate(2px, 2px);
}

/* --- WINDOW COMPONENT --- */
.brut-window {
    position: absolute;
    background: #000;
    /* Match modal black bg */
    border: 4px solid var(--brut-primary);
    /* Match modal thick border */
    box-shadow: 10px 10px 0px rgba(0, 225, 141, 0.3);
    /* Match modal shadow */
    display: flex;
    flex-direction: column;
    min-width: 200px;
    min-height: 150px;
    user-select: none;
    pointer-events: auto;

    /* Enhanced Styling */
    border-radius: 12px;
    background-color: var(--brut-window-bg);
}

.brut-window.active-window {
    border-color: var(--brut-primary);
    z-index: 1000;
    /* Will be managed by JS too */
}

.window-header {
    background: var(--brut-primary);
    /* Inverted header for contrast */
    color: #000;
    padding: 5px 10px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    /* Rounded top matches window */
}

.active-window .window-header {
    background: var(--brut-primary);
    color: #000;
    font-weight: bold;
}

.window-controls span {
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
}

.window-controls span:hover {
    color: #fff;
}

.window-content {
    flex-grow: 1;
    padding: 10px;
    color: var(--brut-primary);
    /* Match modal text color */
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.4;
    user-select: text;
    text-transform: uppercase;
    /* Match modal uppercase */
    /* Allow content selection */

    /* Dot Grid Pattern */
    background-image: radial-gradient(var(--grid-color) 1px, transparent 1px);
    background-size: 10px 10px;
    border-radius: 0 0 10px 10px;
}

.window-content h2 {
    margin-top: 0;
    color: #fff;
    /* White title for contrast */
    border-bottom: 2px dashed var(--brut-primary);
    padding-bottom: 5px;
}

/* Form inside window */
.post-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.post-form input,
.post-form textarea {
    background: #111;
    border: 1px solid #444;
    color: #fff;
    padding: 5px;
    font-family: inherit;
}

.post-form textarea {
    flex-grow: 1;
    resize: none;
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, transparent 50%, var(--brut-primary) 50%);
    cursor: nwse-resize;
}

/* FAB to Open Blog System (Hidden trigger) */
#blog-trigger {
    position: fixed;
    bottom: 0px;
    left: 0px;
    width: 50px;
    /* Larger area to be sure */
    height: 50px;
    background: transparent;
    /* Keep Transparent */
    /* border: 1px solid red; /* Debugging: Uncomment to see trigger area */
    z-index: 20000;
    /* Must be HIGHEST */
    cursor: pointer;
}