/* Game-Specific Layout CSS */
/* Only layout rules specific to this game's grid structure */

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Main Content Grid - two column layout with scrollable panels */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex: 1;
    overflow: hidden;
    margin-left: 160px; /* Space for fixed sidebar */
    height: calc(100vh - 70px); /* Full height minus header and footer */
}

/* Left Column - Input (top) and Output (bottom) */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    height: 100%;
}

/* Right Column - Registers (top 25%) and Memory (bottom 75%) */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    height: 100%;
}

/* Input Panel - top half of left column */
.input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #16213e;
    border-radius: 5px;
    padding: 8px;
    overflow: hidden;
    min-height: 0;
}

.input-panel textarea {
    flex: 1;
    width: 100%;
    background: #0f3460;
    color: #0f0;
    border: 1px solid #00d9ff;
    border-radius: 3px;
    padding: 8px;
    font-family: 'Monaco', monospace;
    font-size: 0.75em;
    resize: none;
    min-height: 0;
}

/* Output Panel - bottom half of left column */
.output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #16213e;
    border-radius: 5px;
    padding: 8px;
    overflow: hidden;
    min-height: 0;
}

.output-panel .assembly-output {
    flex: 1;
    overflow-y: auto;
    background: #0f3460;
    padding: 8px;
    border-radius: 3px;
    font-family: 'Monaco', monospace;
    font-size: 0.75em;
    min-height: 0;
}

/* Controls bar between input and output */
.controls-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    padding: 6px 8px;
    background: #0f3460;
    border-radius: 5px;
}

/* Registers panel - compact, top of right column */
.registers-section {
    flex: 0 0 auto;
    max-height: 25%;
    display: flex;
    flex-direction: column;
    background: #16213e;
    border-radius: 5px;
    padding: 6px;
    overflow: hidden;
}

/* Memory panel - takes remaining space in right column */
.memory-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #16213e;
    border-radius: 5px;
    padding: 6px;
    overflow: hidden;
    min-height: 0;
}

.memory-section .memory-viewer {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* IBM 1130-specific flag styling */
.flags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 6px;
    background: #0a2540;
    border-radius: 3px;
    margin-top: 6px;
    flex-shrink: 0;
}

.flag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7em;
}

.flag-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    transition: background 0.3s;
}

.flag-indicator.set {
    background: #4caf50;
}

/* GitHub Corner Ribbon */
.github-corner {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
}

.github-corner svg {
    fill: #00d9ff;
    color: #1a1a2e;
    width: 60px;
    height: 60px;
}

.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0%, 100% { transform: rotate(0); }
    20%, 60% { transform: rotate(-25deg); }
    40%, 80% { transform: rotate(10deg); }
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f3460;
    color: #888;
    padding: 4px 10px;
    font-size: 0.65em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #00d9ff33;
    z-index: 100;
}

.footer-left {
    display: flex;
    gap: 15px;
}

.footer-right {
    display: flex;
    gap: 15px;
}

.app-footer a {
    color: #00d9ff;
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}
