: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: 1200px;
    margin: 0 auto;
    padding: 0 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;
}

.calc-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;
}

.calc-button i {
    font-size: 0.9em;
}

.calc-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: 100px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards 0.3s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1 {
    font-size: 3.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;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Karty narzędzi */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: 30px;
}

.tool-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);
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    animation: cardAppear 0.8s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.4s; }
.tool-card:nth-child(2) { animation-delay: 0.6s; }

@keyframes cardAppear {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 170, 255, 0.15);
    border-color: rgba(0, 170, 255, 0.3);
}

h2 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: var(--primary);
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    position: relative;
}

input[type="text"] {
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--light);
    border: 1px solid rgba(0, 170, 255, 0.3);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

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);
}

/* Stopka */
footer {
    background: rgba(10, 14, 23, 0.9);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
    border-top: 1px solid rgba(0, 170, 255, 0.1);
    margin-top: 50px;
    transition: all 0.5s ease;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

/* Przycisk "Do góry" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 170, 255, 0.2);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(5px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(0, 170, 255, 0.3);
    transform: translateY(-3px);
}

.back-to-top i {
    color: var(--light);
    font-size: 1.2rem;
}

/* Responsywność */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        padding: 10px;
        gap: 10px;
    }
    
    .calc-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-top: 40px;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        margin-top: 50px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .tool-card {
        padding: 20px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* 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); }
}

/* Animowane przejścia między stronami */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.page-transition::before {
    opacity: 1;
}
/* 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);
}