/* 
    ՄԱԹԵՄԱՏԻԿԱԿԱՆ ԼԱԲՈՐԱՏՈՐԻԱ - ՈՃԵՐԻ ՖԱՅԼ
    Designed for clarity and accessibility.
*/

:root {
    --primary-color: #4a90e2; /* Nice Blue */
    --secondary-color: #50e3c2; /* Mint Green */
    --accent-color: #f5a623; /* Orange for interaction */
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f4f7f6;
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.logo h2 {
    margin-top: 0;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 20px;
}

.menu {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.menu li {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu li:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.menu li.active {
    background: var(--primary-color);
    font-weight: bold;
}

.footer-note {
    margin-top: auto;
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
}

/* MAIN CONTENT STYLES */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.tab {
    display: none; /* Hide all tabs by default */
    animation: fadeIn 0.5s ease;
}

.tab.active-tab {
    display: block; /* Show active tab */
}

h1 {
    color: #2c3e50;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
}

/* THEORY BOX */
.theory-box {
    background: #fff;
    padding: 20px;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    background: #eee;
    padding: 10px;
    text-align: center;
    margin: 15px 0;
    border-radius: 5px;
    color: #d35400;
}

/* INTERACTIVE AREA LAYOUT */
.interactive-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.controls {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.visualizer {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 5px;
}

/* FORM ELEMENTS */
label {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
    font-size: 1rem;
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background: #357abd;
}

.result-box {
    margin-top: 10px;
    padding: 15px;
    background: #e8f8f5;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

/* WELCOME CARDS */
.instruction-cards {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.card h3 {
    color: var(--primary-color);
}

canvas {
    max-width: 100%;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px; }
    .menu { display: flex; margin: 0 20px; overflow-x: auto; }
    .menu li { white-space: nowrap; margin-bottom: 0; margin-right: 10px; }
    .logo { display: none; }
    .instruction-cards { flex-direction: column; }
}