/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0a1929 0%, #1a1a2e 100%);
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

/* Kontener dla treści (wyśrodkowanie) */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}

/* Nawigacja */
nav {
    background: linear-gradient(90deg, #1a237e, #283593);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

nav button {
    background: rgba(255, 255, 255, 0.05);
    color: #bbdefb;
    border: 2px solid transparent;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav button:hover {
    background: rgba(187, 222, 251, 0.1);
    transform: translateY(-2px);
    border-color: #64b5f6;
    color: #ffffff;
}

.effect-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #64b5f6;
    transition: width 0.3s ease;
}

nav button:hover .effect-line {
    width: 80%;
}

/* Nagłówki - wyśrodkowane */
h1 {
    color: #bbdefb;
    font-size: 2.8rem;
    text-align: center;
    margin: 2.5rem 0;
    padding-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #64b5f6, transparent);
    border-radius: 2px;
}

h2 {
    color: #90caf9;
    font-size: 1.9rem;
    margin: 2rem 0 1.2rem;
    padding: 10px 0;
    text-align: center;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #42a5f5;
    border-radius: 2px;
}

h3 {
    color: #e3f2fd;
    font-size: 1.5rem;
    margin: 1.8rem 0 1rem;
    padding-bottom: 0.5rem;
    text-align: center;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: #42a5f5;
    opacity: 0.6;
}

/* Paragrafy i tekst - wyśrodkowane */
p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    color: #cfd8dc;
    line-height: 1.7;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Listy */
ul {
    background: rgba(30, 30, 46, 0.7);
    padding: 1.8rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 2rem auto;
    list-style-position: inside;
    max-width: 800px;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

li {
    margin-bottom: 0.9rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    padding-left: 2rem;
}

li:before {
    content: '▶';
    color: #64b5f6;
    position: absolute;
    left: 0;
}

li:hover {
    background: rgba(100, 181, 246, 0.1);
    transform: translateX(5px);
    color: #ffffff;
}

li:last-child {
    border-bottom: none;
}

/* Przyciski tematów - wyśrodkowane */
.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 3rem auto;
    max-width: 900px;
}

a button {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(21, 101, 192, 0.3);
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

a button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

a button:hover:before {
    left: 100%;
}

a button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(21, 101, 192, 0.4);
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
}

a {
    text-decoration: none;
}

/* Sekcje kodu */
pre {
    background: rgba(13, 17, 23, 0.9);
    color: #d4d4d4;
    padding: 2rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-left: 5px solid #1565c0;
    max-width: 900px;
    text-align: left;
    position: relative;
}

pre:before {
    content: 'Code';
    position: absolute;
    top: 0;
    left: 0;
    background: #1565c0;
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 0 0 10px 0;
}

/* Formularz */
form {
    background: rgba(30, 30, 46, 0.8);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin: 3rem auto;
    max-width: 700px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #bbdefb;
    text-align: left;
}

input, textarea {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Tabele */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    max-width: 900px;
    background: rgba(30, 30, 46, 0.8);
}

th {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: white;
    padding: 1.2rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #e0e0e0;
}

tr:hover td {
    background: rgba(100, 181, 246, 0.1);
}

/* Responsywność */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-container {
        padding: 10px;
    }
    
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav button {
        width: 100%;
        margin: 5px 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    p {
        padding: 0 15px;
        font-size: 1.1rem;
    }
    
    pre {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    
    a button {
        width: 90%;
        min-width: auto;
    }
    
    ul {
        padding: 1.2rem 1.5rem;
    }
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body > *:not(nav) {
    animation: fadeIn 0.8s ease-out;
}

/* Karty/segmenty */
.content-card {
    background: rgba(30, 30, 46, 0.6);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

/* Obrazy */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(100, 181, 246, 0.3);
}

/* Stopka */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: #90a4ae;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Scrollbar stylizacja */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1565c0, #1e88e5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e88e5, #42a5f5);
}