/* CSS cho admin pages */
.entrance-exam-admin {
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    margin: 0;
}

/* CSS cho entrance page layout */
.entrance-container {
    max-width: 600px;
    margin: 0 auto;
}

.entrance-description {
    max-width: 820px;
    margin: 0 auto;
    padding: 16px 36px;
}

.entrance-description.info-max-width {
    padding-bottom: 8px;
}

#unlock-form {
    padding: 16px 36px;
}

.debug-alert {
    background: #e3f2fd;
    color: #0277bd;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #2196f3;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* CSS cho custom notification */
.entrance-notification {
    display: none;
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    animation: slideDown 0.4s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-text {
    font-size: 1rem;
    font-weight: 600;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

/* CSS cho form unlock */
.form-group {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    gap: 10px;
    max-width: 365px;
    flex-wrap: nowrap;
}

.keycode-input {
    max-width: calc(100% - 125px);
    padding: 12px 16px;
    font-size: 1.5rem;
    border: none;
    outline: none;
    border-radius: 4px;
    color: #0F172A;
    background: #F1F5F7;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.keycode-input::placeholder {
    color: #004646;
    opacity: 0.8;
}

.unlock-btn {
    padding: 20px 28px;
    font-size: 1rem;
    font-weight: 400;
    background: #ED3838;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

a.unlock-btn {
    display: inline-block;
    text-decoration: none;
}

a.unlock-btn:hover {
    color: #FFFFFF;
    transform: translateY(-3px);
}

.btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* CSS cho info boxes */
.info-box {
    margin-bottom: 40px;
}

.info-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    font-family: "Alexandria", arial !important;
    font-optical-sizing: auto;
    font-size: 1rem;
    font-weight: 300;
    font-style: normal;
    text-align: center;
    margin-bottom: 0;
}

.info-max-width .info-text {
    max-width: 548px;
    margin: 0 auto;
}

/* Entrance heading */
#page-local-ieltstest-entrance .ielts-test-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#page-local-ieltstest-entrance .ielts-test-header .heading_animate {
    margin-top: 40px;
    margin-bottom: 0;
}

#page-local-ieltstest-entrance .ielts-test-header .heading_animate svg {
    width: auto;
}

#page-local-ieltstest-entrance .ielts-test-header .heading_content {
    position: relative;
}

#page-local-ieltstest-entrance .ielts-test-header .heading_content .heading_icon {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
}

#page-local-ieltstest-entrance .ielts-test-header .heading_content .heading_icon_02 {
    top: -65px;
}

#page-local-ieltstest-entrance .ielts-test-content {
    background-color: unset;
    margin-top: 0;
    padding-top: 16px;
}

#page-local-ieltstest-entrance .ielts-test-content:before {
    content: none;
}

.entrance-empty img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* CSS cho entrance exam page - animations và effects */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#custom-notification {
    margin-top: 16px;
    transition: all 0.3s ease;
}

#close-notification {
    transition: all 0.3s ease !important;
}

#close-notification:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    transform: scale(1.1) !important;
}

@media (max-width: 1023px) {
    #page-local-ieltstest-entrance .ielts-test-header .heading_animate {
        margin-top: 30px;
        overflow: unset;
    }

    #page-local-ieltstest-entrance .ielts-test-header .heading_animate svg {
        height: 55px;
    }
}


@media (max-width: 767px) {
    #page-local-ieltstest-entrance .ielts-test-content {
        margin-top: 0;
    }

    #unlock-form,
    .entrance-description {
        padding: 16px 24px;
    }

    .keycode-input {
        max-width: calc(100% - 98px);
        font-size: 1rem;
    }

    .unlock-btn {
        padding: 10px 14px;
    }

    #page-local-ieltstest-entrance .ielts-test-header .heading_content .heading_icon_02 {
        top: -55px;
    }

    .heading_icon.heading_icon_02 img {
        max-width: 75px;
    }
}

/* Responsive cho mobile */
@media (max-width: 509px) {
    .unlock-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .heading_content h1.small_heading {
        font-size: 26px;
    }

    #page-local-ieltstest-entrance .ielts-test-header .heading_animate.short_bg svg {
        height: 50px;
    }
}

/* CSS for revamped revamped entrance page UI */
.revamped-entrance-ui {
    margin-top: 40px;
    position: relative;
    padding-bottom: 60px;
}

/* Timeline Styles */
.entrance-timeline {
    position: relative;
    margin-bottom: 24px;
    padding: 0;
    margin-top: 56px;
    width: 100%;
}

.timeline-segment {
    position: absolute;
    top: 50%;
    height: 2px;
    background: #B8D3D9;
    z-index: 1;
    transform: translateY(-50%);
    transition: background 0.3s ease;
}

.timeline-segment.reached {
    background: #ED3838;
}

.revamped-entrance-ui {
    box-sizing: border-box;
}

.timeline-step {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    /* Center dot on its position */
}

/* Fix for first and last dots to avoid horizontal overflow beyond grid */
.timeline-step.step-start {
    transform: translate(0, -50%);
}

.timeline-step.step-finish {
    transform: translate(-100%, -50%);
}

.timeline-dot {
    background: #FFFFFF;
}

.timeline-step.reached .timeline-dot,
.timeline-step.active .timeline-dot {
    border-color: #ED3838;
}

.timeline-label {
    font-size: 0.75rem;
    color: #004646;
    text-align: center;
    font-weight: 400;
    position: absolute;
    bottom: 22px;
    white-space: pre-line;
    line-height: 0.7;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-step.step-start .timeline-label {
    left: 0;
    transform: none;
    text-align: left;
}

.timeline-step.step-finish .timeline-label {
    left: auto;
    right: 0;
    transform: none;
    text-align: right;
}

/* Skill Cards Layout */
.skill-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.skill-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.skill-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
    min-height: 328px;
    width: 100%;
    box-sizing: border-box;
}

.skill-card.listening {
    background: #E1F2FF;
}

.skill-card.reading {
    background: #EAF4F5;
}

.skill-card.writing {
    background: #FFEEF0;
}

.skill-card.speaking {
    background: #F1F5F7;
}

.skill-card .ielts-test-score {
    position: absolute;
    z-index: 3;
    bottom: 0;
    right: 16px;
    transform: translateY(50%);
}

.skill-card-image {
    width: 100%;
    height: auto;
}

.skill-card-title {
    font-size: 1rem;
    font-weight: 400;
    color: #004646;
    margin-bottom: 0;
}

.skill-card-timer-below {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #004646;
    padding-left: 4px;
}

.skill-card-timer-below .time-icon i {
    font-size: 13px;
}

.skill-card-time {
    font-size: 0.75rem;
    font-weight: 400;
}

.time-icon.in-progress,
.skill-card-time.in-progress {
    color: #ED3838;
}

.skill-card.locked:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    z-index: 5;
}

.skill-card-lock-overlay {
    position: absolute;
    top: 50%;
    left: 15px;
    right: 15px;
    transform: translateY(-50%);
    background: #FFFFFF;
    padding: 24px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 10;
    text-align: center;
}

.skill-card-lock-overlay p {
    font-family: "Alexandria", arial !important;
    font-size: 0.75rem;
    color: #004646;
    margin-top: 16px;
    margin-bottom: 0;
}

/* Bottom Bar Styles */
.entrance-bottom-bar-wrapper {
    background: #fff;
    margin-top: 40px;
}

.entrance-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bottom-user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overall-score-wrapper {
    display: flex;
    column-gap: 8px;
    align-items: center;
}

.overall-score-text p {
    font-size: 1rem;
    font-weight: 400;
    color: #004646;
    margin-bottom: 0;
}

.bottom-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 400;
    color: #B8D3D9;
}

.user-info-separator {
    opacity: 0.6;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-meta-name {
    font-weight: 600;
    color: #94A3B8;
}

.user-meta-id {
    font-weight: 600;
    color: #94A3B8;
}

.bottom-action-buttons {
    display: flex;
    gap: 16px;
}

.btn-entrance-action {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none !important;
}

.btn-entrance-action:hover {
    transform: translateY(-3px);
}

.btn-entrance-primary,
.btn-entrance-primary:hover {
    background: #ED3838;
    color: #FFFFFF;
}

.btn-entrance-secondary {
    background: #F1F5F7;
    color: #B2BDC0;
}

.btn-entrance-secondary.ready {
    background: #ED3838;
    color: #FFFFFF;
}

/* Success Screen Styles */
.entrance-success-screen {
    text-align: center;
    margin: 0 auto;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-success-screen {
    padding: 16px 25px;
    border-radius: 8px;
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-home {
    background: #F1F5F7;
    color: #004646;
}

.btn-learn {
    background: #ED3838;
    color: #FFFFFF;
}

.btn-success-screen:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.btn-home:hover {
    color: #004646;
}

.btn-learn:hover {
    color: #FFFFFF;
}

.skill-card.finalized .skill-card-time {
    color: #94A3B8;
}

.skill-card-result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 2;
    border-radius: 12px;
}

.skill-card-wrapper:hover .skill-card-result-overlay {
    opacity: 1;
}

.btn-view-result {
    background-color: #ffffff;
    color: #004646;
    padding: 12px 21px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-view-result:hover {
    color: #004646;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .skill-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .entrance-bottom-bar {
        flex-direction: column;
        gap: 20px;
    }

    .bottom-action-buttons {
        width: 100%;
    }

    .btn-entrance-action {
        flex: 1;
        padding: 12px 20px;
    }

    .entrance-bottom-bar-wrapper {
        position: static;
    }

    .revamped-entrance-ui {
        padding-bottom: 0;
    }
}