* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    /* font-family: "Roboto Mono", monospace; */
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
}

body {
    /* background: #E0AAFF; */
    /* background: #F4EFFA; */
    background: #DEC9E9;
    /* background: #C8B1E4; */
    /* background: white; */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* GENERAL CONTAINER */
.container {
    display: flex;
    max-width: 800px;
    width: 100%;
    height: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px #C19EE0;
    /* border: #22223B solid 3px; */
    /* CHANGE LATER */
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

/* ------------------- LEFT HALF OF CONTAINER ------------------- */

.display-area {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    /* background: #F4EFFA; */
    /* DELETE LATER */
}

/* CHARACTER IMAGE */
.character-display {
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 15px;
    /* box-shadow: 0 5px 15px #C19EE0; */
    /* DELETE LATER */
    position: relative;
    overflow: hidden;
    /* margin-bottom: 30px; */
}

/* MINI CONTAINER FOR PICTURES */
.character-base {
    width: 100%;
    height: 100%;
    position: relative;
}

/* PICTURES */
.body-layer,
.outfit-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ------------------- RIGHT HALF OF CONTAINER ------------------- */

.selection-area {
    flex: 1;
    padding: 30px;
    background: #F4EFFA;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    /* background: #f0f2f5; */
    /* background: #EAD6F5; */
    background: #DED9E2;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 25px;
}

.tab {
    flex: 1;
    padding: 12px 15px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-icon {
    width: 30px;
    height: 30px;
}

.tab.active {
    /* background: white; */
    background: #F7F4EA;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}


.tab-content.active {
    display: flex;
}

/* ------------------------------ TAB SCROLL BAR ------------------------ */

.tab-content::-webkit-scrollbar {
    width: 8px;
}

.tab-content::-webkit-scrollbar-thumb {
    background-color: #DED9E2;
    border-radius: 10px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background-color: #c0b9dd;
}

.tab-content::-webkit-scrollbar-track {
    background-color: #f0f2f5;
    border-radius: 10px;
}

/* ----------------------- TAB MENU ----------------------------- */

.section-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.option {
    height: 120px;
    /* background: #ffffff; */
    background: #DED9E2;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    overflow: hidden;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option.selected {
    border-color: #532B88;
    /* border-color: #5E548E; */
}

.option img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.placeholder {
    font-size: 2rem;
    color: #9CA3AF;
}

.birthday-content {
    text-align: center;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.birthday-pic img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}

.birthday-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    justify-self: center;
}

.btn-primary {
    /* background: #6247AA; */
    background: #532B88;
    color: white;
    justify-self: center;
    margin-bottom: -10px;
}

.btn-primary:hover {
    /* background: #453279; */
    background: #2F184B;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background: #f0f2f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e2e6ee;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ---------------------- POP UP ---------------------  */

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

.popup-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    height: auto;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}


.birthday-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
    text-align: center;
}

/* ---------------------- PASSWORD ---------------------  */

#passwordForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

#passwordInput {
    padding: 10px;
    width: 80%;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
}

#cardLinkContainer a {
    display: inline-block;
    /* margin-top: 20px; */
    color: #6C63FF;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}

#cardLinkContainer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .display-area {
        padding: 20px;
    }

    .character-display {
        width: 250px;
        height: 350px;
    }
}

/* ----------------------- MOBILE FIX -------------------------- */
@media (max-width: 820px) {
    body {
        align-items: flex-start;
        /* stop vertical centering */
        overflow-y: auto;
        /* enable scrolling */
    }

    .container {
        flex-direction: column;
        /* stack display + selection vertically */
        height: auto;
        /* allow height to grow naturally */
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .display-area,
    .selection-area {
        padding: 20px;
    }

    .tab-content {
        max-height: 400px;
        /* scroll only inside tabs */
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .container {
        box-shadow: none;
        border-radius: 10px;
    }
}

.display-area,
.selection-area {
    transition: all 0.5s ease-in-out;
}