:root {
    --adobe-red: #ff0000;
    --adobe-dark: #2C2C2C;
    --adobe-gray: #747474;
    --adobe-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --text-main: #2C2C2C;
    --text-muted: #505050;
    --border-color: #E1E1E1;
    --sidebar-width: 320px;
    --header-height: 70px;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px; /* Slightly thinner for a cleaner look */
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
    border: none;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--adobe-red);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ccc var(--adobe-light);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header */
header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    height: 32px;
}

.header-logo span {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--adobe-dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--adobe-dark);
    cursor: pointer;
    margin-right: 15px;
}

/* Layout */
.app-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--adobe-light);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 24px 0;
    z-index: 999;
    left: 0;
    transition: left 0.3s ease;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.sidebar.active {
    left: 0 !important;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li a {
    display: flex;
    align-items: flex-start;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.4;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar nav ul li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--adobe-red);
}

.sidebar nav ul li a i {
    min-width: 20px;
    margin-right: 12px;
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--adobe-gray);
}

.sidebar nav ul li a:hover i, .sidebar nav ul li a.active i {
    color: var(--adobe-red);
}

.sidebar nav ul li ul {
    margin-top: 4px;
    margin-bottom: 8px;
}

.sidebar nav ul li ul li a {
    padding-left: 56px; /* 24px primary padding + 20px icon + 12px margin */
    font-size: 0.85rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    width: calc(100% - var(--sidebar-width));
}

.hero-banner {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    background: var(--adobe-dark);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 80px;
    color: white;
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
}

.hero-overlay h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-overlay p {
    font-size: 1.2rem;
    max-width: 500px;
    opacity: 1;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-left: 4px solid var(--adobe-red);
}

.content-body {
    padding: 60px 80px;
    max-width: 1200px; /* Still capping for readability, but layout is full width */
}

section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--adobe-red);
    color: var(--adobe-dark);
}

h3 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    color: var(--adobe-dark);
}

h4 {
    font-size: 1.1rem;
    margin: 24px 0 12px;
    color: var(--adobe-dark);
}

p {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.05rem;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
}

/* Adobe-style formatting */
blockquote {
    border-left: 4px solid var(--adobe-red);
    background: var(--adobe-light);
    padding: 20px;
    margin: 24px 0;
    border-radius: 0 4px 4px 0;
}

blockquote strong {
    color: var(--adobe-red);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 24px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
}

th {
    background: var(--adobe-light);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tr:nth-child(even) {
    background: #FAFAFA;
}

/* Code */
.code-wrapper {
    position: relative;
    margin: 24px 0;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.copy-btn i {
    pointer-events: none;
}

code {
    background: var(--adobe-light);
    color: var(--adobe-red);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

pre {
    background: #1e1e1e;
    color: #dcdcdc;
    padding: 24px;
    border-radius: 8px;
    margin: 0; /* Margin handled by code-wrapper */
    overflow-x: auto;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Images in content */
.content-body img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 24px 0;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    padding: 40px 80px;
    background: var(--adobe-dark);
    color: white;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 24px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
    .mobile-toggle {
        display: block;
    }
    .sidebar {
        left: calc(-1 * var(--sidebar-width)) !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        
    }
    .sidebar.active {
        left: 0 !important;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .hero-overlay {
        padding: 0 30px;
    }
    .hero-banner {
        height: 400px;
    }
    .content-body {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .header-logo span {
        font-size: 1rem;
    }
    .hero-overlay h1 {
        font-size: 2.2rem;
    }
    .hero-overlay p {
        font-size: 1rem;
    }
    .content-body {
        padding: 30px 20px;
    }
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.3rem;
    }
    pre {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 1.8rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--adobe-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
    font-size: 20px;
    z-index: 100;
}

.back-to-top.visible {
    display: flex;
}
