/* Minimalist Brutalist Design */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.compiler-box {
    border: 1px solid #ffffff;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #000000;
}

.title {
    font-size: 1.35rem;
    font-weight: normal;
    text-transform: uppercase;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Upload Area */
.upload-area {
    border: 1px dashed #ffffff;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: background-color 0.15s ease;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #ffffff;
    color: #000000;
    border-style: solid;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled) {
    background-color: #ffffff;
    color: #000000;
}

.btn:disabled {
    border-color: #444444;
    color: #444444;
    cursor: not-allowed;
}

.btn-download {
    background-color: #ffffff;
    color: #000000;
}

.btn-download:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Tabs UI */
.tabs {
    display: flex;
    border: 1px solid #ffffff;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    background-color: #000000;
    color: #ffffff;
    border: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:not(:last-child) {
    border-right: 1px solid #ffffff;
}

.tab-btn.active, .tab-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Code Editor Area */
.code-area-container {
    width: 100%;
}

#latex-code {
    width: 100%;
    height: 160px;
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    line-height: 1.4;
}

#latex-code:focus {
    border-style: dashed;
}

/* Status Messages */
.status-msg {
    font-size: 0.85rem;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid #ffffff;
    padding: 0.65rem;
    word-break: break-all;
}

/* Log / Terminal Output */
.log-container {
    border: 1px solid #ffffff;
    background-color: #000000;
}

.terminal {
    padding: 1rem;
    height: 180px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.log-line {
    word-break: break-all;
    white-space: pre-wrap;
    color: #ffffff;
}

.log-line.system-msg {
    color: #888888;
}

.log-line.stderr {
    color: #ffffff;
    text-decoration: underline;
}

/* GitHub Floating Button */
.github-link {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 0.65rem;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    z-index: 100;
}

.github-link:hover {
    background-color: #ffffff;
    color: #000000;
}

.github-icon {
    display: block;
}

/* Toast / Redirect Modal */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border: 1px solid #ffffff;
    background-color: #000000;
    color: #ffffff;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    z-index: 1000;
    line-height: 1.4;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .github-link {
        top: auto;
        bottom: 1.5rem;
        left: 1.5rem;
        right: auto;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 5rem;
        max-width: none;
    }
}
