/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Linux console theme */
html, body {
    height: 100%;
}

body {
    font-family: 'Courier New', 'Fira Code', 'Monaco', monospace;
    background-color: #0a0e12;
    color: #c0c5ce;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Horizontal menu */
.main-menu {
    background-color: #1a1f24;
    border-bottom: 1px solid #2d6a4f;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    padding: 1rem 0;
}

.logo h2 {
    color: #2d6a4f;
    font-size: 1.3rem;
    font-weight: normal;
    letter-spacing: 1px;
}

.logo h2::before {
    content: "> ";
    color: #40916c;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    display: block;
    padding: 1rem 0;
    color: #c0c5ce;
    text-decoration: none;
    font-family: monospace;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: #2d6a4f;
    border-bottom-color: #2d6a4f;
}

nav ul li a.active {
    color: #40916c;
    border-bottom-color: #40916c;
}

a, a:visited, a:hover, a:active {
    color: #40916c; 
    text-decoration: underline; 
}

/* Main content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Container for page content */
.container {
    background-color: #0f1217;
    border: 1px solid #2d6a4f;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Typography */
h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #40916c;
    font-weight: normal;
    letter-spacing: -0.5px;
}

h1::before {
    content: "$ ";
    color: #2d6a4f;
}

h2 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: #2d6a4f;
    font-weight: normal;
}

h2::before {
    content: "# ";
    color: #40916c;
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Console style for magic ball */
.console-container {
    margin: 2rem 0;
}

.question-section {
    margin-bottom: 2rem;
}

.console-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: monospace;
    background-color: #0a0e12;
    border: 1px solid #2d6a4f;
    border-radius: 4px;
    color: #c0c5ce;
    margin: 0.5rem 0;
}

.console-input:focus {
    outline: none;
    border-color: #40916c;
    box-shadow: 0 0 5px rgba(64,145,108,0.3);
}

.console-button {
    background-color: #1a1f24;
    color: #40916c;
    border: 1px solid #2d6a4f;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-family: monospace;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.console-button:hover {
    background-color: #2d6a4f;
    color: #0a0e12;
    border-color: #40916c;
}

.answer-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #2d6a4f;
}

.answer-prompt {
    color: #40916c;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.answer-prompt::before {
    content: "$ ";
    color: #2d6a4f;
}

.answer-output {
    background-color: #0a0e12;
    border-left: 3px solid #2d6a4f;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #c0c5ce;
    margin: 1rem 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.answer-output.error {
    border-left-color: #dc2626;
    color: #dc2626;
}

.answer-output.success {
    border-left-color: #40916c;
    color: #40916c;
}

.answer-history {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #2d6a4f;
}

.history-title {
    color: #2d6a4f;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.history-title::before {
    content: "# ";
    color: #40916c;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.history-item {
    padding: 0.5rem;
    border-bottom: 1px solid #1a1f24;
    font-family: monospace;
}

.history-question {
    color: #40916c;
}

.history-answer {
    color: #c0c5ce;
    margin-left: 1rem;
}

.history-timestamp {
    color: #6c757d;
    font-size: 0.7rem;
    margin-left: 1rem;
}

/* Footer with donate button */
.footer {
    background-color: #1a1f24;
    border-top: 1px solid #2d6a4f;
    padding: 1.5rem 2rem;
    text-align: center;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.8rem;
    color: #6c757d;
}

.donate-button {
    background-color: transparent;
    color: #40916c;
    border: 1px solid #2d6a4f;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-family: monospace;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.donate-button:hover {
    background-color: #2d6a4f;
    color: #0a0e12;
    border-color: #40916c;
}

.donate-button:active {
    transform: scale(0.98);
}

/* TON icon */
.ton-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
}

/* TON icon alternative using emoji for better compatibility */
.ton-emoji {
    font-size: 1.1rem;
    display: inline-block;
}

/* Notification toast */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1a1f24;
    border: 1px solid #2d6a4f;
    color: #40916c;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    z-index: 2000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .menu-container {
        flex-direction: column;
        padding: 0.5rem 0;
    }
    
    .logo {
        padding: 0.5rem 0;
    }
    
    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 0.5rem;
    }
    
    nav ul li a {
        padding: 0.5rem 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .history-list {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .console-input {
        font-size: 0.8rem;
    }
    
    .console-button {
        width: 100%;
    }
    
    .history-item {
        font-size: 0.7rem;
    }
}
