html { box-sizing: border-box; }
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.65;
    background: #fafafa;
    letter-spacing: 0.01em;
}
/* ================ HEADER ================  */
.header {
    padding: 24px 40px;
    min-height: 100px;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
}
.header .logo {
    height: 42px;
    filter: brightness(0) invert(1);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.header .logo:hover {
    opacity: 0.9;
    transform: scale(1.05) rotate(-2deg);
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(255,255,255,0.3));
}
.header .logo:active {
    transform: scale(0.95);
}
.header .tagline {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    padding-right: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}
.header-getting-started {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.header-gs-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.95;
}
.header-gs-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}
.header.scrolled {
    min-height: 60px;
    padding: 16px 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.header.scrolled .header-getting-started {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.3s ease;
}
.header:not(.scrolled) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.header:not(.scrolled) .header-getting-started {
    opacity: 1;
    max-height: 100px;
    transition: opacity 0.3s ease 0.1s, max-height 0.3s ease;
}
@media only screen and (max-width: 1100px) {
    .header-getting-started {
        display: none;
    }
}
@media only screen and (max-width: 768px) {
    .header .tagline {
        border-right: none;
        padding-right: 0;
    }
}
@media only screen and (max-width: 500px) {
    .header .tagline {
        display: none;
    }
    .header {
        padding: 20px 24px;
        min-height: 70px;
    }
}
/* ================ FOOTER ================  */
.footer {
    color: #888;
    padding: 16px 24px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    clear: both;
    font-size: 12px;
}
.footer .links {
    float: left;
}
.footer .links a {
    color: #666;
    margin-right: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.footer .links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.footer .links a:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.footer .links a:hover::after {
    width: 100%;
}

.footer .links a:visited {
    color: #777;
}

.footer .links a:visited:hover {
    color: #667eea;
}
.footer .copyright {
    float: right;
}


main {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
@media only screen and (max-width: 800px) {
    main {
        flex-direction: column-reverse;
    }
}
/* ================ MENU ================  */
aside {
    min-width: 220px;
    max-width: 220px;
    background: #f9f9f9;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
}
aside > ul {
    list-style: none;
    margin: 0;
    padding: 16px 12px;
}
aside > ul > li {
    line-height: 1.6em;
    margin-bottom: 4px;
}

aside > ul > li > ul  {
    list-style: none;
    padding-left: 12px;
}
aside > ul > li > ul li {
    line-height: 1.4em;
    margin-bottom: 2px;
}

.main-container {
    flex-grow: 1;
    overflow: auto;
    padding: 24px 32px;
    max-width: 1000px;
}
.main-container h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid #667eea;
    line-height: 1.3;
    letter-spacing: -0.02em;
    scroll-margin-top: 72px;
}

.main-container h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2a2a2a;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    scroll-margin-top: 72px;
}

.main-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: #3a3a3a;
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.4;
    letter-spacing: -0.005em;
    scroll-margin-top: 72px;
}

.main-container h4 {
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    margin: 0 0 10px 0;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    scroll-margin-top: 72px;
}

.main-container p {
    margin: 0 0 16px 0;
    line-height: 1.7;
}

.main-container ol, .main-container ul {
    margin: 0 0 16px 0;
    line-height: 1.7;
}

.main-container li {
    margin: 6px 0;
    line-height: 1.65;
}

.main-container ol li a,
.main-container a {
    color: #667eea;
    text-decoration: none !important;
}

.main-container a:hover,
.main-container  a:hover {
    text-decoration: underline !important;
}


.getting-started-container {
    padding: 24px;
}

.button-container {
    text-align: center;
}
.button {
    color: #667eea;
    background: transparent;
    border: 2px solid #667eea;
    display: inline-block;
    padding: 20px;
    margin: 10px 0;
    vertical-align: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button:hover {
    color: #F8F8F8;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.button:visited {
    color: #667eea;
}

.button:visited:hover {
    color: #F8F8F8;
}

a.button,a:active.button,a:visited.button {
    color: #667eea;
}
a.button:hover {
    color: #F8F8F8;
}

.side-menu a,a:active,a:visited {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}
a:hover {
    color: #764ba2;
    transform: translateY(-1px);
}
a:visited {
    color: #8b7db8;
}
a.underline {
    text-decoration: underline;
}
a.underline:hover {
    text-decoration-color: #764ba2;
    text-decoration-thickness: 2px;
}

.partner-container, .api-container {

}
.partner, .api {
    display: inline-block;
    border-radius: 4px;
    color: white;
    background-color: #aaa;
    padding: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.partner:hover, .api:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.partner:active, .api:active {
    transform: translateY(0px) scale(1.0);
}

.partner a, .api a {
    color: white;
    transition: all 0.2s ease;
}

.partner a:hover, .api a:hover {
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.partner a:visited, .api a:visited {
    color: #f0f0f0;
}

pre {
    color: #e8eaf6;
    background: #2d2d2d;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 13px;
    overflow-x: auto;
    border-left: 3px solid #667eea;
    margin: 12px 0;
    line-height: 1.6;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.01em;
}

code {
    background: #f5f5f5;
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 13px;
    color: #667eea;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.01em;
    min-height: 100%;
}

code:hover {
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

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

/* Dwukolumnowy layout dla Request/Response */
.req-res-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
    clear: both;
    transition: grid-template-columns 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.req-res-grid > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.req-res-grid:has(> div:first-child:hover) {
    grid-template-columns: 5.67fr 1fr;
}

.req-res-grid:has(> div:last-child:hover) {
    grid-template-columns: 1fr 5.67fr;
}

.req-res-grid h4 {
    margin-top: 0;
    flex-shrink: 0;
}

.req-res-grid pre {
    margin-top: 0;
    margin-bottom: 0;
    flex-grow: 1;
    overflow-x: auto;
}

/* Kompaktowe obrazki */
.main-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border-radius: 8px;
}

.main-container a:hover img {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

/* ================ TABLE ================  */
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    margin: 20px 0;
    line-height: 1.6;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.02em;
}

tbody td {
    padding: 10px 16px;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.65;
}
tbody th {
    padding: 10px 16px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    font-weight: 500;
}

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

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: linear-gradient(90deg, #f5f5ff 0%, #fafafa 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

tbody tr:active {
    transform: scale(1.0);
}

/* ================ LANDING PAGE ================  */
.front-page-container {
    background: rgb(233,233,233);
    background: linear-gradient(180deg, rgba(233,233,233,1) 0%, rgba(255,255,255,1) 100%);
}
.front-page-container .header {
    border-bottom: none;
}
.front-page-container h1 {
    padding: 0 40px;
}
.side-menu h2,
.side-menu h3 {
    margin-bottom: 8px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.3;
}

.side-menu h2 {
    font-size: 13px;
    margin-top: 20px;
}

.side-menu h3 {
    font-size: 12px;
    margin-top: 14px;
}

.side-menu a {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.1s ease;
    color: #444;
    position: relative;
    overflow: hidden;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.side-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #667eea;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.side-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.side-menu a:hover::before {
    transform: scaleY(1);
}

.side-menu a:visited {
    color: #555;
}

.side-menu a:visited:hover {
    color: white;
}

.side-menu a:active {
    transform: translateX(4px) scale(0.98);
}

.side-menu ul ul {
    margin-left: 8px;
    border-left: 2px solid #e8e8e8;
}

.side-menu ul ul a {
    font-size: 12px;
    padding: 5px 10px;
    line-height: 1.45;
}

.main-container i,
.main-container em {
    font-style: italic;
    color: #555;
    letter-spacing: 0.01em;
}

.main-container b,
.main-container strong {
    font-weight: 600;
    color: #1a1a1a;
}

hr.hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 32px 0;
    margin-bottom: 0;
}

.side-menu ul {
    padding: 0;
    padding-left: 12px;
}