* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    
    --primary: #3b82f6;         
    --primary-dark: #1d4ed8;     
    --secondary: #0ea5e9;       
    --accent: #06b6d4;         
    --dark: #0f172a;            
    --dark-secondary: #1e293b;   
    --dark-tertiary: #334155;
    --light: #f8fafc;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    
    --gradient-1: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

.hero {
    position: relative;
    padding: 8rem 0;
    text-align: center;
   
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), 
                url('https://zndirect.pl/wp-content/uploads/2023/08/co-to-baza-danych.jpeg');
    background-size: cover;     
    background-position: 60% 30%;
    background-repeat: no-repeat;
    overflow: hidden;
    color: white; 
}


.subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.topic-card {
    background: var(--dark-secondary);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.topic-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.topic-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(68, 136, 246, 0.437);
    margin-bottom: 0.5rem;
}

.topic-card h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.topic-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}


.img-placeholder {
    width: 100%;
    height: 400px;         
    
    border-radius: 10px;
    overflow: hidden;     
    margin: 2rem 0;
    padding: 0;           
    position: relative;
    background: var(--dark-secondary);
}

.img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;       
    object-position: center; 
    display: block;
}



.content-section {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.content-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

.content-section p {
    margin-bottom: 1.5rem;
}

.code-block {
    background: #000;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    font-family: 'Courier New', monospace;
    color: #00ff9d;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--text-muted);
    margin-top: auto;
}

.topics-grid .topic-card:last-child {
    grid-column: 1 / -1;  
    justify-self: center; 
    

    width: 100%; 
    max-width: 400px; 
}
.content-img {
    display: block;          
    width: 100%;              
    max-width: 600px;        
    height: auto;             
    margin: 2rem auto;       
    border-radius: 15px;      
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
    border: 1px solid rgba(59, 130, 246, 0.2); 
}
.home-btn {
    position: absolute;   
    top: 30px;             
    left: 30px;             
    width: 60px;             
    height: auto;
    z-index: 100;            
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
    opacity: 0.8;
}

.home-btn:hover {
    transform: scale(1.1);   
    opacity: 1;              
    filter: drop-shadow(0 0 10px var(--primary)); 
}

@media (max-width: 768px) {
    .home-btn {
        width: 40px;
        top: 20px;
        left: 20px;
    }
}
.quiz-btn {
    background-color: var(--success); 
    color: white !important;          
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin-left: auto;               
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quiz-btn:hover {
    background-color: transparent;
    border-color: var(--success);
    color: var(--success) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.quiz-option {
    display: block;
    background: var(--dark-secondary);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.2s;
}

.quiz-option:hover {
    background: rgba(59, 130, 246, 0.1);
}

.quiz-option input {
    margin-right: 10px;
}

.result-box {
    background: var(--dark-secondary);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    border: 2px solid var(--primary);
    display: none; 
}
.finish-btn {
    display: block;
    width: 100%;
    padding: 1.2rem;
    margin-top: 3rem;
    background: var(--gradient-1); 
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.finish-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    filter: brightness(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9); 
    backdrop-filter: blur(5px);        
    z-index: 10000;
    display: none; 
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--dark-secondary);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid var(--primary);
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
    transform: scale(0.8);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-score {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 1rem 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.hero {
    position: relative; 
}

.hero-quiz-btn {
    position: absolute;        
    top: 25px;                 
    right: 25px;               
    
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
    color: white !important;   
    padding: 12px 30px;        
    border-radius: 50px;      
    text-decoration: none;    
    font-weight: 700;         
    font-size: 1rem;
    
   
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 100;              
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-quiz-btn:hover {
    transform: translateY(-3px) scale(1.05); 
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.6); 
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%); 
}

@media (max-width: 768px) {
    .hero-quiz-btn {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}