@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Fira+Code:wght@400;500&display=swap');
:root {
    --primary-color: #00f0ff;
    --primary-hover: #00c3cf;
    --accent-color: #ff00ea;
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --code-bg: rgba(0, 0, 0, 0.4);
    --success: #10b981;
}
::-moz-selection {
	background: #8b0080;
	color: #fff;
	-webkit-text-fill-color: #fff;
}
::selection {
	background: #8b0080;
	color: #fff;
	-webkit-text-fill-color: #fff;
}
* {
    box-sizing: border-box;
	word-break: break-word;
}
p {
	width: 100%;
}
button {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
}
body {
    background: radial-gradient(circle at 15% 50%, #1e1b4b, #0f172a 60%);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.layout-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}
.sidebar {
    position: sticky;
    top: 40px;
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 15px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 2;
}
.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar a.active,
.sidebar a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.content-area {
    display: flex;
	gap: 30px;
}
[data-lang="he"] .content-area {
	direction: rtl;
}
.sections-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
h1 {
	width: 100%;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-align: center;
}
h2, h3 {
	width: 100%;
    color: var(--text-main);
    margin-top: 0;
}
h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
h4 {
	width: 100%;
    margin: 1.5rem 0 0.5rem;
    color: var(--primary-color);
}
section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
	align-items: flex-start;
    scroll-margin-top: 40px; 
}
pre {
	width: 100%;
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
code {
    font-family: 'Fira Code', monospace;
}
pre .blue { color: #38bdf8 !important; } 
pre .red { color: #f472b6 !important; }  
pre .purple { color: #c084fc !important; } 
pre .grey { color: #94a3b8 !important; } 
pre .green { color: #34d399 !important; } 
.param-list {
	width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.param-item {
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem;
	padding: 1.2rem;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.05);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.param-item:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}
.param-name {
    font-family: 'Fira Code', monospace;
    color: #fff;
    word-break: break-word;
    flex: 0 0 100%;
}
.param-desc {
	width: 100%;
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex: 1; 
}
.param-desc code {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-color);
}
a.yBox, button.yBox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #000;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
a.yBox:hover, button.yBox:hover {
    filter: brightness(1.1);
}
.group-wrap {
    width: calc(100% + 4rem);
    display: flex;
    gap: 20px;
    overflow: auto;
    padding: 20px;
    margin: 0 -2rem;
}
.group-wrap a,
.iframeSection a,
.group-wrap button,
.iframeSection button {
	width: 100%;
	position: relative;
	display: block;
	min-width: 220px;
	aspect-ratio: 16 / 16;
	border-radius: 12px;
	overflow: hidden;
	border: 2px solid rgba(255,255,255,0.1);
	transition: border-color 0.2s ease;
}
.group-wrap a:hover,
.iframeSection a:hover,
.group-wrap button:hover,
.iframeSection button:hover {
    border-color: var(--primary-color);
    z-index: 2;
}
.group-wrap img,
.iframeSection img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}
.group-wrap button:hover img,
.iframeSection button:hover img {
    opacity: 0.7;
}
.play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    border: 2px solid var(--primary-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
button:hover .play {
    background: var(--primary-color);
    border-color: #fff;
}
.play::after {
    content: "";
    display: block;
    margin-left: 6px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid white; 
}
.myYboxClass .yBoxFrame {
    background: #1e293b !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px !important;
}
.myYboxClass .closeYbox {
    filter: invert(1); 
}
[data-lang="he"] .t-en { display: none !important; }
[data-lang="en"] .t-he { display: none !important; }
.t-he,
[data-lang="he"] .sections-wrap,
[data-lang="he"] .sidebar nav {
	direction: rtl;
	text-align: right;
}
[data-lang="he"] .param-item {
	direction: rtl;
}
[data-lang="he"] ol,
[data-lang="he"] ul:not(.ybox-socials-list) {
	padding-right: 1.4rem;
	padding-left: 0;
}
pre,
pre * {
	direction: ltr !important;
	text-align: left !important;
}
span {
	display: inline-block;
}
.lang-toggle {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 999;
	background: var(--accent, #00bcd4);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 7px 16px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 0.02em;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	transition: opacity 0.2s;
}
.lang-toggle:hover { opacity: 0.85; }

@media screen and (max-width: 1200px) {
	.content-area {
		flex-direction: column;
	}
	.sidebar {
		background: #1e293b;
		width: auto;
		top: 0;
		margin: 0 -10px;
		padding: 10px 10px;
		border-radius: 0;
	}
	.sidebar nav {
		flex-direction: row;
	}
	.sidebar a {
		white-space: nowrap;
	}
}
@media screen and (max-width: 767px) {
	h3 {
		font-size: 18px;
	}
	h4 {
		font-weight: 400;
	}
    .param-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 10px;
    }
    .param-name {
        flex: 0 0 auto;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 5px;
    }
    h1 { font-size: 2.2rem; }
    .layout-wrapper {
		margin-top: 20px;
		padding: 0 10px;
	}
    pre,
	section {
        padding: 10px;
        border-radius: 8px;
    }
	.group-wrap a, .iframeSection a, .group-wrap button, .iframeSection button {
		min-width: 170px;
	}
	.group-wrap {
		width: calc(100% + 3rem);
		margin: 0 -1.5rem;
	}
}