* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #FCEDA6;
    color: #444444;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.splash-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FCEDA6;
    text-align: center;
    cursor: pointer;
    padding: 2rem;
}

.splash-screen .logo {
    width: 12rem;
}

.splash-screen p {
    font-size: 1rem;
    color: #444;
}

/*home page*/
.home-container {
    background-color: #FCEDA6;
    padding-bottom: 7rem;
}

.home-streak-header {
    width: 100%;
    background-color: #fff9e5;
    text-align: center;
    padding: 6rem 1rem 4rem 1rem;
}

.home-streak-icon {
    width: 6.5rem;
    margin: 0 auto 1.5rem auto;
    display: block;
}

.home-streak-text {
    font-size: 1rem;
    font-weight: 400;
}

.home-streak-highlight {
    color: #1D8A99;
    font-weight: 600;
}

.home-main-buttons {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.home-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.home-button {
    width: 8.5rem;
    height: 8.5rem;
    background-color: #fff9e5;
    border: 2px solid #DBAD6A;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.home-button-icon {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
}

.home-button-label {
    font-size: 1.1rem;
    color: #444444;
    text-align: center;
}

/*recently studied*/
.home-recently-studied {
    padding: 1rem;
    margin-top: 2rem;
}

.home-recent-heading {
    color: #1D8A99;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.home-recent-text {
    font-size: 1rem;
    font-weight: 400;
    color: #444444;
}

/*bottom nav bar*/
.home-bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #fff9e5;
    border-top: 2px solid #DBAD6A;
    display: flex;
    justify-content: space-around;
    padding: 1.3rem 0;
    z-index: 10;
}

.home-nav-link img {
    width: 2.5rem;
    height: 2.5rem;
}


/*lib page*/
.lib-container {
    background-color: #FCEDA6;
    padding-bottom: 7rem;
    min-height: 100vh;
}

.lib-header {
    background-color: #FCF4D1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem;
    gap: 0.5rem;
    max-width: 100%
}

.lib-logo {
    width: 12rem;
    height: auto;
    margin: 0 auto;
}

.lib-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #444;
}

.lib-main {
    padding: 2rem 1rem;
}

.lib-heading {
    font-size: 1.3rem;
    font-weight: 600;
    color: #444;
    text-align: left;
    max-width: 90%;
    margin: auto auto 1.3rem auto;
}

.lib-text {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #444;
    max-width: 60%;
    justify-self: center;
    text-align: center;

}

.lib-create {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 10%;
}

.lib-create-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7.5rem;
    height: 7.5rem;
    background-color: #fff9e5;
    border: 2px solid #DBAD6A;
    border-radius: 1rem;
    text-decoration: none;
}

.lib-create-button img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.lib-create-label {
    font-size: 1rem;
    color: #444;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.confirmation-content {
    background-color: #fff9e5;
    border: 3px solid #DBAD6A;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    width: 90%;
    max-width: 20rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.confirmation-text {
    font-size: 1.05rem;
    color: #1D8A99;
    margin-bottom: 1.5rem;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.confirmation-btn {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #DBAD6A;
    border-radius: 0.75rem;
    background-color: #fffef3;
    cursor: pointer;
    font-weight: 600;
}

.confirmation-btn.yes {
    color: green;
}

.confirmation-btn.no {
    color: #cc0000;
}

/*edit/new set page*/
.new-main {
    padding: 1rem;
    background-color: #FCEDA6;
    max-width: 90%;
    margin: 0 auto;
}

.return-link {
    font-size: 1rem;
    color: #444;
    text-decoration: underline;
    margin: 0;
}

.edit-link {
    font-size: 1rem;
    color: #444;
    text-decoration: underline;
    margin: 0;
}

.new-heading {
    font-size: 1.3rem;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.text-input,
.text-area {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #fffef3;
    border: 1.5px solid #DBAD6A;
    border-radius: 0.5rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #444;
    resize: vertical;
}

.card-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background-color: #fffef3;
    border: 1px solid #DBAD6A;
    border-radius: 0.5rem;
    resize: vertical;
    font-family: 'Open Sans', sans-serif;
    color: #7c7c7c;
    font-size: 1rem;

}

.char-count {
    font-size: 0.85rem;
    color: #444;
    text-align: right;
    margin-bottom: 1rem;
}

.card {
    background-color: #FCF4D1;
    border: 2px solid #DBAD6A;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-title {
    background-color: #FCF4D1;
    padding: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #DBAD6A;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.delete-btn img {
    width: 1.25rem;
}

.add-card-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.add-card-btn {
    background-color: #fff9e5;
    border: 2px solid #DBAD6A;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.add-card-btn img {
    width: 1.5rem;
}

.lib-header a,
.lib-header h2 {
    min-width: 90%;
    justify-self: left;
    text-align: left;
    margin: auto;
}

.set-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.set-icons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.set-icons button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.set-icons button:hover {
    transform: scale(1.1);
}

.set-icons img {
    width: 1.75rem;
    height: 1.75rem;
}

.set-box {
    flex: 1;
    border: 2px solid #1D8A99;
    border-radius: 0.75rem;
    background-color: #fff9e5;
    padding: 1rem;
    max-width: 90%;
}

.set-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1D8A99;
    margin-bottom: 0.25rem;
}

.set-box p {
    font-size: 1rem;
    color: #444;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.edit-note {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #444;
}

.new-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 3rem;
}

.form-btn {
    padding: 0.75rem 1.5rem;
    background-color: #fff9e5;
    border: 2px solid #DBAD6A;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #444;
    font-weight: 600;
    text-align: center;
}

/*flashcard set page*/
.set-main {
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* center everything vertically */
    height: 85vh;
    overflow: hidden;
    /* no scroll */
    position: relative;
}

.flashcard {
    background-color: #fff9e5;
    border: 2px solid #DBAD6A;
    border-radius: 0.75rem;
    padding: 2rem;
    min-width: 35rem;
    min-height: 16rem;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.1);
    /*    margin: 1rem 0;*/
}

.flip-tip {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.swipe-tip {
    font-size: 1rem;
    color: #444;
    margin-top: 0.75rem;
}

@media (min-width: 768px) and (orientation: landscape) {
    .swipe-tip {
        position: absolute;
        top: 43%;
        right: 3rem;
        margin-top: 0;
        max-width: 7rem;
    }

    .progress-bar {
        flex: 1;
        height: 0.5rem;
        background-color: #1D8A99;
        border-radius: 1rem;
        overflow: hidden;

    }
}

.progress-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 90%;
    max-width: 35rem;
    margin-top: 1rem;
}


.progress-fill {
    background-color: #00cfeb;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.card-counter {
    font-size: 1rem;
    color: #444;
    white-space: nowrap;
}

.set-header {
    background-color: #fff9e5;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.set-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #444;
}

/*portrait*/
@media (max-width: 768px) {
    .flashcard {
        font-size: 1rem;
        min-height: 10rem;
        min-width: 20rem;
        padding: 1.25rem;
    }

    .set-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .set-header h2 {
        font-size: 1.3rem;
    }

    .progress-section {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .swipe-tip {
        position: static;
        text-align: center;
    }

    .card-counter {
        font-size: 0.9rem;
    }

    .progress-bar {
        width: 20rem;
        height: 0.5rem;
        background-color: #1D8A99;
        border-radius: 1rem;
        overflow: hidden;
        min-width: 12rem;
    }

    .progress-fill {
        background-color: #00cfeb;
        height: 100%;
        width: 0%;
        transition: width 0.3s ease;
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    .flashcard {
        min-width: 28rem;
        min-height: 14rem;
        font-size: 0.95rem;
    }

    .swipe-tip {
        top: 48%;
        right: 6rem;
        font-size: 0.9rem;
    }

    .progress-section {
        max-width: 28rem;
    }
}
