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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #000000;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #fafafa;
    border-right: 1px solid #e0e0e0;
    padding: 40px 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.logo {
    padding: 0 30px 30px 30px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    line-height: 1.4;
}

.logo .subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-weight: 400;
}

.category {
    padding: 12px 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #333;
    border-left: 3px solid transparent;
    display: block;
    text-decoration: none;
}

.category:hover {
    background: #f0f0f0;
    color: #000;
}

.category.active {
    background: #fff5f0;
    color: #ff6b35;
    border-left-color: #ff6b35;
    font-weight: 500;
}

.algorithm-list {
    display: none;
}

.category.active + .algorithm-list,
.algorithm-list.show {
    display: block;
}

.algorithm {
    padding: 10px 30px 10px 50px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
}

.algorithm:hover {
    background: #f5f5f5;
    color: #ff6b35;
}

.algorithm.active {
    color: #ff6b35;
    font-weight: 500;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 60px 80px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 40px;
}

.content-header h2 {
    font-size: 36px;
    font-weight: 600;
    color: #000;
    margin-bottom: 10px;
}

.content-header p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Welcome Page Styles */
.welcome-section {
    margin-top: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.category-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:not(.disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
}

.category-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #000;
}

.category-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Algorithm Page Styles */
.section {
    margin-bottom: 50px;
}

.section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}

.formula-box {
    background: #fafafa;
    border-left: 4px solid #ff6b35;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.formula-box .label {
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 8px;
}

.controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #e65a2b;
}

.btn-secondary {
    background: #333;
}

.btn-secondary:hover {
    background: #000;
}

#plot {
    width: 100%;
    height: 500px;
    margin: 20px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #ff6b35;
}

.accent {
    color: #ff6b35;
}

.info-text {
    background: #f0f8ff;
    border-left: 4px solid #4a90e2;
    padding: 15px;
    margin: 20px 0;
    color: #333;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}