main {
    margin-top: 20px;
    margin-left: 65px;
    margin-right: 65px;
    max-width: none;
    padding: 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    padding: 20px;
}

.join-code {
    background-color: #324dc7;
    width: 100%;
    padding: 50px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.join-info {
    color: #ffffff;
    font-size: 23px;
    line-height: 1.45;
    max-width: 820px;
    text-align: center;
}

.dashboard-action-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dashboard-action-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.join-code-button,
.ap-subject-button,
.class-student-button {
    text-decoration: none;
    min-height: 0;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    font-family: inherit;
    border: 1px solid #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.join-code-button {
    margin-top: 30px;
    background-color: #fedb00;
    color: #111111;
}

.join-code-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ap-subject-button {
    background-color: rgb(255, 204, 0);
    padding: 20px 35px;
    border-radius: 40px;
    border: 3px solid rgb(255, 255, 255);
    color: #111111;
    font-size: 20px;
    transition: all 0.3s;
}

.ap-subject-button:hover {
    border: 3px solid rgb(217, 217, 217);
}

.class-student-button {
    background-color: #324dc7;
    color: #ffffff;
    padding: 20px 35px;
    border-radius: 40px;
}

.class-student-button:hover {
    background-color: #253ba1;
}

.join-code-button:focus-visible,
.ap-subject-button:focus-visible,
.class-student-button:focus-visible,
.cancel-btn:focus-visible,
.submit-btn:focus-visible {
    outline: 2px solid #6f8fd2;
    outline-offset: 1px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 29, 49, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 140;
    padding: 16px;
}

.modal {
    background: #ffffff;
    border: 0;
    border-radius: 20px;
    padding: 30px;
    width: min(560px, 100%);
    text-align: center;
}

.modal h2 {
    margin: 0 0 20px;
    display: flex;
    justify-content: flex-start;
    color: #1f2430;
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 700;
}

.join-code-statement {
    margin: 0 0 15px;
    color: #1f2430;
    font-size: 0.94rem;
    line-height: 1.45;
    font-weight: 700;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.cancel-btn,
.submit-btn {
    border: 1px solid #000000;
    background: #ffffff;
    color: #1f2430;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    font-family: inherit;
}

.submit-btn {
    background: #fedb00;
    color: #1f2430;
}

.submit-btn:disabled {
    border-color: #000000;
    background: #ffffff;
    color: #777777;
    cursor: not-allowed;
}

.code-input {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
}

.code-input input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    caret-color: transparent;
    text-transform: uppercase;
}

.slots {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.slots span {
    height: 55px;
    border: 0;
    border-bottom: 3px solid #324dc7;
    background: transparent;
    color: #1f2430;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    line-height: 55px;
    font-family: Consolas, "Courier New", monospace;
}

.code-input input:focus + .slots span {
    border-bottom-color: #21399a;
}

@media (max-width: 900px) {
    main {
        margin-left: 20px;
        margin-right: 20px;
    }

    .join-code {
        padding: 34px 22px;
    }

    .join-info {
        font-size: 1.1rem;
    }
}

@media (max-width: 680px) {
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .modal {
        padding: 16px;
    }

    .slots span {
        height: 44px;
        font-size: 1.06rem;
        line-height: 42px;
    }

    .join-code-button,
    .ap-subject-button,
    .class-student-button {
        width: 100%;
    }
}
