* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: #ccc;
    background-color: #ddd;
    overflow: hidden;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 32px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    filter: drop-shadow(0 0 5px #09001d);
}

.navbar a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: #004a99;
}

.main {
    min-height: 100vh;
    transition: .3s ease;
}

.main.active {
    filter: blur(15px);
    pointer-events: none;
}

.container {
    display: flex;
    height: 100vh;
    width: 200%;
}

.home {
    position: relative;
    width: 100%;
    left: -50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content {
    max-width: 600px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.home-content h1 {
    font-size: 80px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 0, 0, .3);
    color: #004a99;
}

.home-content p {
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 0, 0, .3);
    margin-bottom: 30px;
    color: #0066cc;
}

.home-content .start-btn {
    width: 190px;
    height: 55px;
    background: #004a99;
    border: 2px solid #0066cc;
    outline: none;
    border-radius: 6px;
    box-shadow: 0 0 10px #0066cc;
    font-size: 18px;
    color: #222;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: .5s;
}

.home-content .start-btn:hover {
    background: #ccc;
    box-shadow: none;
}

.popup-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 500px;
    background: #fff;
    border-radius: 6px;
    padding: 10px 25px;
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
}

.popup-info.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.popup-info h2 {
    font-size: 50px;
    color: #004a99;
}

.popup-info .info {
    display: inline-block;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin: 4px 0;
}

.popup-info select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 6px;
    margin: 10px 0;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.popup-info select:focus {
    border-color: #004a99;
    outline: none;
}

.popup-info option {
    font-size: 16px;
    color: #333;
    background-color: #fff;
}

.popup-info select, .popup-info option {
    font-family: Arial, sans-serif;
}

.popup-info .category-select {
    margin: 15px 0;
}

.popup-info .btn-group .info-btn[disabled] {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.popup-info .btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #999;
    margin-top: 10px;
    padding: 15px 0 7px;
}

.popup-info .btn-group .info-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 130px;
    height: 45px;
    background: #004a99;
    border: 2px solid #004a99;
    outline: none;
    border-radius: 6px;
    color: #bbb;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    transition: .5s;
}

.popup-info .btn-group .info-btn:nth-child(1) {
    background: transparent;
    color: #004a99;
}

.popup-info .btn-group .info-btn:nth-child(1):hover {
    background: #004a99;
    color: #333;
}

.popup-info .btn-group .info-btn:nth-child(2):hover {
    background: transparent;
    color: #004a99;
}

.quiz-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    left: -50%;
    width: 100%;
    background: #000;
    transition: .8s ease-in-out;
    transition-delay: .25s;
    z-index: 100;
}

.quiz-section.active {
    left: 0;
}

.quiz-section .quiz-box {
    position: relative;
    width: 500px;
    background: transparent;
    border: 2px solid #0066cc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    opacity: 0;
    pointer-events: none;
    transform: scale(.9);
}

.quiz-section .quiz-box.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    transition: 1s ease;
    transition-delay: 1s;
}

.quiz-box h1 {
    color: #bbb;
    font-size: 32px;
    text-align: center;
    background: linear-gradient(45deg, transparent, #004a99, transparent);
    border-radius: 6px;
    text-shadow: 0 0 15px rgba(0, 0, 0, .3);
}

.quiz-box .quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 30px;
}

.quiz-header span {
    font-size: 18px;
    font-weight: 500;
}

.quiz-header .header-score {
    background: #0066cc;
    border-radius: 3px;
    padding: 7px;
    color: #111;
}

.quiz-box .question-text {
    font-size: 24px;
    font-weight: 600;
}

.option-list .option {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    font-size: 17px;
    margin: 15px 0;
    cursor: pointer;
    transition: .3s;
}

.option-list .option:hover {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .1);
}

.option-list .option.correct {
    color: #00a63d;
    border-color: #00a63d;
}

.option-list .option.incorrect {
    color: #a60045;
    border-color: #a60045;
}

.option-list .option.disabled {
    pointer-events: none;
}

.quiz-box .quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #004a99;
    padding-top: 20px;
    margin-top: 25px;
}

.quiz-footer .question-total {
    font-size: 16px;
    font-weight: 600;
}

.quiz-footer .next-btn {
    width: 100px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .1);
    outline: none;
    border-radius: 6px;
    font-size: 16px;
    color: rgba(255, 255, 255, .3);
    font-weight: 600;
    pointer-events: none;
    cursor: pointer;
    transition: .5s;
}

.quiz-footer .next-btn.active {
    pointer-events: auto;
    background: #004a99;
    border-color: #004a99;
    color: #111;
}

.quiz-footer .next-btn.active:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #333;
}

.quiz-section .result-box {
    position: absolute;
    transform: translate(-50%, - 50%) scale(0);
    width: 500px;
    border: 2px solid skyblue;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
}

.quiz-section .result-box.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, - 50%) scale(1)
}

.result-box h2 {
    font-size: 52px;
}

.result-box .buttons {
    display: flex;
}

#saveScoreBtn[disabled] {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.result-box .percentage-container {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 40px;
}

.percentage-container .circular-progress {
    position: relative;
    width: 250px;
    height: 250px;
    background: conic-gradient(skyblue 3.6deg, rgba(255, 255, 255, .1) 0deg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.percentage-container .circular-progress::before {
    content: '';
    position: absolute;
    width: 210px;
    height: 210px;
    background-color: #111;
    border-radius: 50%;
}

.circular-progress .progress-value {
    position: relative;
    font-size: 45px;
    font-weight: 600;
}

.percentage-container .score-text {
    font-size: 26px;
    font-weight: 600;
    margin-top: 20px;
}

.buttons button {
    width: 130px;
    height: 47px;
    background: skyblue;
    border: 2px solid skyblue;
    outline: none;
    border-radius: 6px;
    font-size: 16px;
    color: #222;
    font-weight: 600;
    margin: 0 20px 20px;
    cursor: pointer;
    transition: .5s;
}

.buttons button:nth-child(2) {
    background: transparent;
    color: skyblue;
}

.buttons button:nth-child(2):hover {
    background: skyblue;
    color: #111;
}

.buttons button:nth-child(1):hover {
    background: #76bcca;
    color: #111;
}

.result-box .save-score-form {
    display: none;
}

.result-box .save-score-form.active {
    display: block;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-box .save-score-form input {
    width: 100%;               
    max-width: 300px;         
    padding: 10px 15px;        
    font-size: 16px;           
    border: 2px solid #ccc;   
    border-radius: 5px;        
    box-sizing: border-box;    
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 5px;
}

.result-box .save-score-form input:focus {
    border-color: skyblue;     
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    outline: none;      
}

.result-box .save-score-form input::placeholder {
    color: #888;               
    font-style: italic;
}

.result-box .save-score-form button {
    
    width: 100%;               
    max-width: 300px;         
    padding: 10px 15px;     
    font-size: 16px;          
    border: 2px solid #ccc;   
    border-radius: 5px;     
    background-color: #f0f0f0; 
    cursor: pointer;          
    box-sizing: border-box;    
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;       
}

.result-box .save-score-form button:focus {
    border-color: skyblue;
    background-color: #e0e0e0; 
    color: #333;
    box-shadow: 0 0 8px rgba(135, 206, 235, 0.4);  
    outline: none;
}

.result-box .save-score-form button:disabled {
    background-color: #ddd;    
    border-color: #bbb;        
    cursor: not-allowed;       
    color: #888;               
}

.result-box .save-score-form button:not(:disabled):hover {
    background-color: skyblue; 
    border-color: skyblue;     
    color: white;              
}

/* Telefony i tabletu */

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }
    
    .header {
        padding: 15px 5%;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        font-size: 26px;
    }

    .navbar {
        display: flex;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .navbar a {
        margin: 10px 10px 0 0;
        font-size: 16px;
    }

    .home-content h1 {
        font-size: 48px;
        text-align: center;
    }

    .home-content p {
        font-size: 16px;
    }

    .popup-info {
        width: 90%;
        padding: 15px;
    }

    .popup-info h2 {
        font-size: 32px;
        text-align: center;
    }

    .quiz-section .quiz-box,
    .quiz-section .result-box {
        width: 90%;
        padding: 15px;
    }

    .quiz-box h1 {
        font-size: 24px;
    }

    .quiz-box .question-text {
        font-size: 20px;
    }

    .quiz-footer .next-btn {
        width: 100%;
        margin-top: 15px;
    }

    .percentage-container {
        width: 100%;
    }

    .percentage-container .circular-progress {
        width: 180px;
        height: 180px;
    }

    .percentage-container .circular-progress::before {
        width: 150px;
        height: 150px;
    }

    .circular-progress .progress-value {
        font-size: 32px;
    }

    .result-box h2 {
        font-size: 36px;
        text-align: center;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .buttons button {
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .home-content h1 {
        font-size: 36px;
    }

    .quiz-box .question-text,
    .popup-info .info,
    .popup-info select,
    .popup-info option {
        font-size: 14px;
    }

    .quiz-header span,
    .quiz-footer .question-total {
        font-size: 14px;
    }

    .quiz-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .quiz-footer .next-btn {
        width: 100%;
        margin-top: 10px;
    }

    .option-list .option {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .header {
        padding: 10px 5%;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo {
        font-size: 24px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .navbar a {
        margin: 0;
        font-size: 15px;
    }

    .home-content {
        padding: 0 10px;
        text-align: center;
    }

    .home-content h1 {
        font-size: 30px;
    }

    .home-content p {
        font-size: 14px;
    }

    .home-content .start-btn {
        width: 100%;
        height: 45px;
        font-size: 16px;
    }

    .popup-info {
        width: 95%;
        padding: 15px;
    }

    .popup-info h2 {
        font-size: 26px;
    }

    .popup-info .info {
        font-size: 14px;
    }

    .popup-info select {
        font-size: 14px;
    }

    .quiz-section .quiz-box,
    .quiz-section .result-box {
        width: 95%;
        padding: 15px;
    }

    .quiz-box h1 {
        font-size: 22px;
    }

    .quiz-box .question-text {
        font-size: 18px;
    }

    .option-list .option {
        font-size: 15px;
        padding: 10px;
    }

    .quiz-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .quiz-footer .question-total {
        font-size: 14px;
    }

    .quiz-footer .next-btn {
        width: 100%;
        font-size: 16px;
    }

    .percentage-container .circular-progress {
        width: 150px;
        height: 150px;
    }

    .percentage-container .circular-progress::before {
        width: 120px;
        height: 120px;
    }

    .circular-progress .progress-value {
        font-size: 28px;
    }

    .result-box h2 {
        font-size: 30px;
        text-align: center;
    }

    .percentage-container .score-text {
        font-size: 20px;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .buttons button {
        width: 100%;
        font-size: 15px;
        margin: 8px 0;
    }
}