@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body, html {
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Poppins', sans-serif;
    height: auto;
    position: relative;
}

#background-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f0f0f, #1c1c2d, #2a1d47, #332b4f);
}

header {
    width: 100%;
    padding: 5px 5px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

header img.logo {
    margin-left: 20px;
    height: 100px;
    width: auto;
    cursor: pointer;
    justify-content: center;
}

header img.telegram {
    margin-right: 20px;
    height: 60px;
    width: auto;
    cursor: pointer;
    justify-content: center;
}


.card-container {
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    margin: 50px;
}

.card {
    position: relative;
    background: rgba(40, 32, 32, 0.43);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 340px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.card-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card h2 {
    margin-top: 70px;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.card p {
    margin: 12px 0 24px;
    font-size: 14px;
    color: #cccccc;
    line-height: 1.5;
}

.card button {
    background-color: #814483;
    color: #999;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.8;
    transition: background-color 0.3s ease;
}

.card button:hover {
    background-color: #9538a1;
}

.search-container {
    margin: 80px 30px;
    text-align: center;
    color: #fff;
    z-index: 2;
    position: relative;
}

.search-container h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.search-header h1 {
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.25);
    margin-bottom: 8px;
}

.search-description {
    font-size: 15px;
    color: #ccc;
    margin-bottom: 30px;
    letter-spacing: 0.4px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 15px;
}

.search-box input {
    width: 35%;
    min-width: 400px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    font-size: 15px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.4);
}

.search-box button {
    padding: 12px 22px;
    border-radius: 0 12px 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.search-box button:hover {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(79, 172, 254, 0.6);
}

#short-query-warning {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.filters select {
    width: auto;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.filters select:hover,
.filters select:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.4);
}

#pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0 50px;
}

#pagination button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

#pagination button:hover {
    background: rgba(79, 172, 254, 0.2);
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.4);
    transform: translateY(-2px);
}

#pagination button.active {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.6);
    font-weight: 600;
}

.result-card {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.progress-container {
    width: 80%;
    max-width: 500px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4),
                inset 0 0 6px rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    margin: 20px auto;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 14px 0 0 14px;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
    transition: width 0.6s ease-in-out, box-shadow 0.3s ease-in-out;
}

.progress-bar:hover {
    box-shadow: 0 0 25px rgba(79, 172, 254, 0.9);
}

.progress-text {
    margin-top: 12px;
    text-align: center;
    font-weight: 500;
    color: #ddd;
    letter-spacing: 0.5px;
}

#results {
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: #eee;
    font-size: 15px;
    width: 100%;
}

.question-block {
    width: 90%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    margin: 0 10px;
}

.question-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
    color: #9ecbff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.question-header b {
    color: #6eb6ff;
}

.question-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.question-left {
    flex: 1.2;
    color: #fff;
}

.question-left h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}

.answer-image {
    display: block;
    float: left;
    margin: 10px 0;
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.answer-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.question-right {
    flex: 0.8;
    color: #ddd;
}

.question-right ul {
    list-style-type: disc;
    margin-bottom: 10px;
    padding-left: 20px;
}

.question-right li {
    margin: 4px 0;
}

.question-right p b {
    color: #6eb6ff;
}

.correct-answer {
    background: rgba(79, 172, 254, 0.1);
    border-left: 3px solid #4facfe;
    border-radius: 6px;
    padding: 6px 10px;
    color: #bfe4ff;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.correct-answer:hover {
    background: rgba(79, 172, 254, 0.15);
    box-shadow: 0 0 14px rgba(79, 172, 254, 0.25);
}

footer {
    width: 100%;
    text-align: center;
    padding: 16px 0;
    box-sizing: border-box;
    margin-top: auto;
    color: #aaa;
    font-size: 14px;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    position: static;
    bottom: 0;
    z-index: 2;
    transition: background 0.3s ease, color 0.3s ease;
}

footer:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ddd;
}

footer .brand {
    color: #6eb6ff;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

footer .brand:hover {
    color: #00f2fe;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.6);
}

@media (max-width: 768px) {
    .card-container {
        height: auto;
        padding: 60px 10px 40px;
        flex-direction: column;
        margin: 30px;
    }

    .card {
        width: 90%;
        max-width: 350px;
        margin-bottom: 30px;
    }

    .search-container h1 {
        font-size: 22px;
        margin: 0 10px 15px;
    }

    .search-box input {
        width: 300%;
        min-width: 25vw;
    }

    .search-box button {
        width: 90%;
    }

    .filters {
        flex-direction: column;
        align-items: center;
    }

    .filters select {
        width: 100%;
        font-size: 13px;
    }

    .question-block {
        width: 80%;
    }

    .question-content {
        flex-direction: column;
    }

    .question-left h4 {
        font-size: 15px;
    }

    .answer-image {
        max-width: 100%;
        height: auto;
    }

    .question-right {
        font-size: 14px;
    }

    #pagination button {
        padding: 6px 10px;
        font-size: 13px;
    }

    footer {
        font-size: 12px;
        padding: 0px 0;
        position: fixed;
    }

    footer p {
        margin-block: 2px;
    }
}