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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.back-btn:hover {
    color: #c2410c;
    border-color: #fdba74;
    background: #fff7ed;
}

.main-header {
    background: linear-gradient(135deg, #431407 0%, #0f172a 100%);
    color: white;
    padding: 60px 40px 40px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.main-header p {
    font-size: 1.05rem;
    color: #fed7aa;
    max-width: 720px;
    margin: 0 auto;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar a {
    display: block;
    padding: 10px 14px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar a:hover {
    background: #fff7ed;
    color: #0f172a;
}

.sidebar a.active {
    background: #ffedd5;
    color: #c2410c;
    border-left: 3px solid #ea580c;
}

.search-container {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
    background-color: #f8fafc;
}

#search-input:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
    background-color: #fff;
}

.content {
    flex: 1;
}

.category-section {
    margin-bottom: 50px;
    scroll-margin-top: 40px;
}

.category-header {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.command-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 15px 20px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

.platform-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.badge-ftd-clish { background: #ffedd5; color: #9a3412; }
.badge-ftd-lina { background: #fee2e2; color: #991b1b; }
.badge-fxos { background: #e0e7ff; color: #3730a3; }
.badge-fmc-cli { background: #f3e8ff; color: #6b21a8; }
.badge-asa { background: #dbeafe; color: #1e40af; }
.badge-concept { background: #ecfdf5; color: #047857; }

.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    position: relative;
    background: #1e293b;
}

.code-block {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        flex: none;
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
}
