@media only screen and (max-width: 768px) {
        #welcome-banner {
        width: 90vw;
        top: 15%;
        transform: translate(-50%, -15%);
    }

    #arrow-down {
        width: 15vw;
    }

}

@font-face {
    font-family: 'Celestia';
    src: url('font/celestia.ttf') format('truetype');
}

@keyframes background-pan {
    from { background-position: 0% 0;}
    to   {background-position: 100% 0;}
}

body {
    min-height: 200vh;
    margin: 0;
    background-image: url("images/naked_background.png");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;

    animation: background-pan linear;
    animation-timeline: scroll(y);
                      
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}


#front-page {
    position: relative;
    height: 100vh;
    /* pointer-events: none; */
}

#welcome-banner {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -20%);
    width: 50vw;
    object-fit: contain; 
    animation: welcome-banner-fade-out linear forwards;
    animation-timeline: scroll(y); 
    animation-range: 80% 90%;
}

@keyframes welcome-banner-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

#arrow-down {
    width: 2vw;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: arrow-down-fade-out linear forwards;
    animation-timeline: scroll(y);
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 999;
}

#arrow-down:hover {
    transform: translateX(-50%) scale(1.2);
    filter: brightness(1.3);
}

#arrow-down:active {
    transform: translateX(-50%) scale(0.95);
}

@keyframes arrow-down-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

#flutters {
    z-index: 10;
    position: fixed;
    bottom: -50px;
    left: -50px;
    height: 70vh;
    animation: flutters-move-out linear forwards;
    animation-timeline: scroll();
    pointer-events: all;
    cursor: pointer;
}

@keyframes flutters-move-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

#registration-form {
    font-family: 'Celestia';
    color: #60451eff;
    background-color: #fff798ff;
    border: 5px solid #e4c85eff;
    border-radius: 10px;
    max-width: 40em;
    margin: 50px auto;
    padding: 5px 20px;
    backdrop-filter: blur(5px);
}

#registration-form h1 {
    text-align: center;
    margin-bottom: 0;
    font-size: 3em;
}


#registration-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 2em;
}

#registration-form input[type="text"],
#registration-form textarea,
#registration-form input[type="file"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 2px dotted #60451eff;
    border-radius: 5px;
    background-color: #fffaf0ff;
    color: #60451eff;

}

#registration-form input[type="checkbox"] {
    accent-color: #fff798ff;
    margin-right: 10px;
}

#registration-form label[for="rejestracja"] {
    display: inline-block;
    margin-bottom: 15px;
    height: 2em;
}

#registration-form br {
    display: none;
}

#registration-form input[type="submit"] {
    font-family: "Celestia";
    background-color: #e4c85eff;
    color: #60451eff;
    border: 2px solid #60451eff;
    border-radius: 5px;
    padding: 5px 30px;
    font-size: 1.5em;
    display: block;
    margin: 20px auto;
    cursor: pointer;
}
@media only screen and (max-width: 768px) {
        #welcome-banner {
        width: 90vw;
        top: 15%;
        transform: translate(-50%, -15%);
    }

    #arrow-down {
        width: 15vw;
    }

    #registration-form h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 3em;
    }

    #registration-form {
        border: 5px solid #e4c85eff;
        border-right-width: 0;
        border-left-width: 0;
        
        border-radius: 10px;
        /* max-width: 40em; */
        /* margin: 50px auto; */
        /* padding: 5px 20px; */

    }

}

/* Okno wyniku rejestracji */
.result-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.result-card {
    font-family: 'Celestia';
    color: #60451eff;
    background-color: #fff798ff;
    border: 5px solid #e4c85eff;
    border-radius: 10px;
    max-width: 40em;
    width: 100%;
    padding: 5px 20px;
    backdrop-filter: blur(5px);
    animation: result-card-fade-in 0.5s ease-out;
    position: relative;
    z-index: 1;
    margin: 50px auto;
}

@keyframes result-card-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon,
.error-icon {
    font-size: 5em;
    text-align: center;
    margin: 20px 0;
    animation: icon-bounce 0.6s ease-out 0.3s;
    animation-fill-mode: both;
}

.success-icon {
    color: #5cb85c;
}

.error-icon {
    color: #d9534f;
}

@keyframes icon-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title,
.error-title {
    text-align: center;
    font-size: 3em;
    margin: 10px 0;
    animation: title-slide-in 0.5s ease-out 0.5s;
    animation-fill-mode: both;
}

.success-title {
    color: #5cb85c;
}

.error-title {
    color: #d9534f;
}

@keyframes title-slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success-message,
.error-message {
    text-align: center;
    font-size: 1.5em;
    margin: 20px 0;
    animation: message-fade-in 0.5s ease-out 0.7s;
    animation-fill-mode: both;
}

@keyframes message-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.registration-details {
    margin: 30px 0;
    animation: details-fade-in 0.5s ease-out 0.9s;
    animation-fill-mode: both;
}

@keyframes details-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-details h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    border-bottom: 2px dotted #60451eff;
    padding-bottom: 10px;
}

.detail-item {
    margin: 15px 0;
    padding: 10px;
    background-color: #fffaf0ff;
    border: 2px dotted #60451eff;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-label {
    font-size: 1.5em;
    font-weight: bold;
    min-width: 150px;
}

.detail-value {
    font-size: 1.5em;
    flex: 1;
    word-break: break-word;
}

.uploaded-image {
    width: 100%;
    margin-top: 10px;
}

.uploaded-image img {
    max-width: 100%;
    max-height: 300px;
    border: 2px solid #60451eff;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.error-details {
    background-color: #f8d7da;
    border: 2px solid #d9534f;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    font-size: 1.3em;
    color: #721c24;
    animation: error-shake 0.5s ease-out 0.9s;
    animation-fill-mode: both;
}

@keyframes error-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.action-buttons {
    display: block;
    margin-top: 30px;
    animation: buttons-fade-in 0.5s ease-out 1.1s;
    animation-fill-mode: both;
}

@keyframes buttons-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary,
.btn-secondary {
    font-family: "Celestia";
    background-color: #e4c85eff;
    color: #60451eff;
    border: 2px solid #60451eff;
    border-radius: 5px;
    padding: 5px 30px;
    font-size: 1.5em;
    text-decoration: none;
    display: block;
    margin: 20px auto;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: #60451eff;
    color: #fff798ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(96, 69, 30, 0.3);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(96, 69, 30, 0.3);
}

.btn-secondary {
    background-color: #fffaf0ff;
}

/* Responsywność dla okna wyniku */
@media only screen and (max-width: 768px) {
    .result-card {
        border-right-width: 0;
        border-left-width: 0;
        border-radius: 10px;
        padding: 20px;
    }

    .success-title,
    .error-title {
        font-size: 2em;
    }

    .success-icon,
    .error-icon {
        font-size: 4em;
    }

    .detail-item {
        flex-direction: column;
        gap: 5px;
    }

    .detail-label {
        min-width: auto;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}
