* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #eef2f7;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #f0f2f6;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 50px;
}

.sidebar-header {
    padding: 15px;
    background: #e4e6eb;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}

.sidebar-title {
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

.nav-link {
    display: inline-block;
    padding: 8px 15px;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
    border: 1px solid #357abd;
}

.nav-link:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

.radio-group {
    margin-bottom: 10px;
}

.radio-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input {
    margin-right: 8px;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 20px 0;
}

.instructions {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.content-info {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.footer {
    font-size: 11px;
    color: #666;
    text-align: center;
    border-top: 1px solid #ccc;
    padding-top: 15px;
    margin-top: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tabs {
    position: absolute;
    top: 15px;
    left: 25px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 8px 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

.tab-btn.active:hover {
    background: #444;
}

.language-badge {
    position: absolute;
    top: 15px;
    right: 25px;
    background: rgba(255,255,255,0.95);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
}

#container {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #eef2f7;
    padding: 20px;
}

canvas {
    display: block;
    border: 1px solid #ccc;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Hindi font support */
body.hindi-active,
body.hindi-active .sidebar,
body.hindi-active .instructions,
body.hindi-active .content-info,
body.hindi-active .footer,
body.hindi-active .tab-btn {
    font-family: 'Noto Sans Devanagari', Arial, sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar:not(.collapsed) {
        width: 250px;
    }
    
    .tabs {
        left: 15px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .language-badge {
        top: 15px;
        right: 15px;
        padding: 4px 10px;
        font-size: 11px;
    }
}
