:root {
    --primary: #00aaff;
    --primary-dark: #0088cc;
    --secondary: #00ccff;
    --dark: #0a0e17;
    --darker: #05090f;
    --light: #f0f8ff;
    --gray: #8a8a8a;
    --overlay: rgba(5, 9, 15, 0.85);
    --bg-video-filter: brightness(0.4) contrast(1.2);
}

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

body, html {
    height: 100%;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    color: var(--light);
    background: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: var(--bg-video-filter);
    transition: filter 0.5s ease;
}

body:hover #bg-video {
    filter: brightness(0.3) contrast(1.1);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Nawigacja */
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(15px) saturate(180%);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 170, 255, 0.1);
    transition: all 0.5s ease;
}

.back-button {
    text-decoration: none;
    color: var(--light);
    background: rgba(0, 170, 255, 0.15);
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 170, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.2);
}

/* Główna zawartość */
main {
    padding-top: 90px;
    min-height: 100vh;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards 0.3s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

/* Karta kalkulatora */
.calculator-card {
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 170, 255, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    animation: cardAppear 0.8s ease forwards 0.4s;
}

@keyframes cardAppear {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 170, 255, 0.15);
    border-color: rgba(0, 170, 255, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-weight: 500;
}

select, input[type="number"], input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    -moz-appearance: textfield;
}

select {
    background-color: rgba(10, 14, 23, 0.9);
    cursor: pointer;
}

select:hover {
    background-color: rgba(10, 14, 23, 1);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 0.85rem;
}

.calculate-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}

/* Wyniki */
.result {
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0, 170, 255, 0.1);
    display: none;
    animation: fadeIn 0.5s ease;
}

.result h2 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result h2 i {
    color: var(--primary);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(0, 170, 255, 0.2);
}

.result-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
}

/* Stopka */
footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    background: rgba(10, 14, 23, 0.9);
    border-top: 1px solid rgba(0, 170, 255, 0.1);
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

/* Efekty specjalne */
.glow {
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { text-shadow: 0 0 0 rgba(0, 170, 255, 0.7); }
    70% { text-shadow: 0 0 15px rgba(0, 170, 255, 0); }
    100% { text-shadow: 0 0 0 rgba(0, 170, 255, 0); }
}

/* Responsywność */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding-top: 80px;
    }
    
    .calculator-card {
        padding: 15px;
    }
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: rgba(10, 14, 23, 0.9);
backdrop-filter: blur(15px) saturate(180%);
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
border-bottom: 1px solid rgba(0, 170, 255, 0.1);
}

.nav-brand {
display: flex;
align-items: center;
gap: 10px;
color: var(--light);
text-decoration: none;
font-weight: 600;
}

.nav-brand i {
color: var(--primary);
}

.back-button {
background: rgba(0, 170, 255, 0.15);
color: var(--light);
padding: 10px 20px;
border-radius: 6px;
text-decoration: none;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.3s ease;
border: 1px solid rgba(0, 170, 255, 0.2);
}

.back-button:hover {
background: rgba(0, 170, 255, 0.3);
transform: translateY(-2px);
}
input:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}
select:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 14, 23, 0.7);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 3px solid rgba(10, 14, 23, 0.7);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(10, 14, 23, 0.7);
}
button {
    padding: 12px 25px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}