/* ==== GLOBAL/BASE ==== */
body {
    min-height: 100vh;
    font-family: 'Segoe UI', 'Lucida Sans', Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e9edfa 0%, #f3faf3 80%);
}

* {
    box-sizing: border-box;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 48px 25px 40px 25px;
    background: rgba(255, 255, 255, 0.91);
    border-radius: 24px;
    box-shadow: 0 6px 36px 0 rgba(58, 56, 149, 0.09);
    margin-top: 42px;
    min-height: 700px;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}


/* ==== HEADER & BACK BUTTON ==== */
.header {
    display: flex;
    align-items: center;
    margin-right: 20px;
    margin-bottom: 30px;
    font-size: 25px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-button {
    border: none;
    background: #fff;
    box-shadow: 0 3px 12px rgba(60, 72, 170, 0.11);
    cursor: pointer;
    margin-left: 10px;
    font-size: 17px;
    color: #232867;
    padding: 8px 13px;
    border-radius: 8px;
    transition: background 0.4s, box-shadow 0.2s;
}

.back-button:hover {
    background: #e1e4fb;
    box-shadow: 0 6px 18px rgba(54, 65, 183, 0.12);
}

.page-title {
    flex-grow: 1;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #232867;
    letter-spacing: 1px;
}

/* ==== ELECTIVE SELECTION ==== */
.elective-type {
    margin: 20px 0 28px 0;
    padding: 18px 16px;
    background: linear-gradient(145deg, #1a1f4f, #232867);
    color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(35, 40, 103, 0.3);
}

.elective-type label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: white;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group {
    display: flex;
    gap: 35%;
    margin-top: 10px;
}

.radio-group label {
    padding-left: 32px;
    font-size: 1rem;
    color: white;
    font-weight: 500;
    position: relative;
    cursor: pointer;
}

/* stylize radio */
.radio-group input[type="radio"] {
    display: none;
}

.radio-group label::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    height: 19px;
    width: 19px;
    border: 2px solid #87CEEB;
    border-radius: 50%;
    background: #fff;
}

.radio-group input[type="radio"]:checked+label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 9px;
    width: 9px;
    background: linear-gradient(145deg, #1a1f4f, #232867);
    border-radius: 50%;
}

/* ==== SEARCH ==== */
.search-container {
    margin-bottom: 24px;
}

.search-label {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #232867;
}

.search-bar {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    font-size: 1.1em;
    background: #f6f7fb;
    margin-top: 10px;
    transition: border-color 0.27s, box-shadow 0.3s;
}

.search-bar:focus {
    outline: none;
    border-color: #3641b7;
    box-shadow: 0 0 0 2px rgba(54, 65, 183, 0.13);
}

.suggestions-container {
    margin-top: 9px;
    border: 1.6px solid #87CEEB;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 25px rgba(54, 65, 183, 0.07);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 13px 17px;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #87CEEB;
    transition: background 0.18s, color 0.18s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #e3e5fc;
    color: #2f377b;
    font-weight: 600;
}

/* ==== SELECTED SUBJECTS ==== */
.selected-subjects {
    margin-bottom: 17px;
}

.selected-subjects h3 {
    color: #232867;
    margin-bottom: 7px;
    font-size: 18px;
    font-weight: 700;
}

/* Unified Selected Subject Card Style */
.selected-subject,
.subject-card1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 13px;
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(36, 43, 100, 0.09);
    border: 1.2px solid #87CEEB;
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
}

/* Unify content inside cards */
.selected-subject span,
.subject-title1 {
    flex-grow: 1;
    font-size: 1rem;
    color: #000000;
    font-weight: 500;
    letter-spacing: 0.07px;
}

/* Remove button for both subject types */
.selected-subject .remove-subject {
    background: none;
    border: none;
    color: #e01250;
    font-size: 15px;
    cursor: pointer;
    margin-left: 15px;
    padding: 4px 8px;
    border-radius: 7px;
    transition: background 0.2s;
    box-shadow: 0 7px 20px rgba(36, 43, 100, 0.09);
}

.selected-subject .remove-subject:hover {
    background: #ffdbe4;
    transition: background 0.5s;
}

/* Remove inner margin in custom subject header */
.subject-header {
    margin-left: 0;
}

/* Remove double margin on cards */
.selected-subjects h3 {
    margin-bottom: 7px !important;
}


/* ==== CUSTOM SUBJECT CARD ==== */
.subject-card1 {
    /* background: rgba(246,246,255,0.73); */
    border: 1.2px solid #cdd2fa;
    border-radius: 10px;
    padding: 13px 10px 13px 14px;
    margin-bottom: 13px;
    box-shadow: 0 7px 20px rgba(36, 43, 100, 0.09);
}

.subject-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subject-title1 {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    letter-spacing: 0.1px;
}

.remove-subject1 {
    background: none;
    border: none;
    color: #e01250;
    font-size: 15px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 7px;
    transition: background 0.2s;
    box-shadow: 0 7px 20px rgba(36, 43, 100, 0.09);
}

.remove-subject1:hover {
    background: #ffdbe4;
    transition: background 0.5s;
}

/* ==== FOOTER ==== */
footer {
    width: 100%;
    margin-top: 100px;
    background: none;
    
}

#cust {
    background: linear-gradient(145deg, #bdc2f3, #fff6f6);
    padding: 12px;
    border-radius: 22px;
    display: flex;
    gap: 37%;
    justify-content: space-between;
    align-items: center;
    margin: 2vw auto;
    max-width: 98vw;
    box-shadow: 0 10px 30px rgba(35, 40, 103, 0.3);
    position: relative;
    top: 50px;
}

#cust a {
    text-decoration: none;
}

#cust .cust-button {
    background-color:#232867;
    color: white;
    padding: 9px ;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-left: 20px;
    gap: 6px;
    position: relative;
  overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(35, 40, 103, 0.3);
    
}

#cust .cust-button:hover::before {
  left: 100%;
}

#cust .cust-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(135, 206, 250, 0.2), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}


#cust .cust-button:hover {
    background:#232867;
    color:white ;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(135, 206, 250, 0.4);
}

#cust .cust-button:active {
  transform: translateY(-1px);
}

.confirm-container {
    display: inline;
}

#confirm-button {
    background-color: #21782b;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 11px 20px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    margin-right: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(35, 40, 103, 0.3);
    /* box-shadow: 0 1px 8px rgba(33, 120, 43, 0.09);
    transition: background 0.23s, color 0.18s; */
}

#confirm-button:hover {
    background: #17fa48;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(135, 206, 250, 0.4);
}

footer {
    position: static;
    margin-bottom: 50px;
}

/* ==== FORMS (if showing) ==== */
.custom-form {
    padding: 32px 24px;
    margin-top: 40px !important;
    background: rgba(252, 254, 255, 0.96);
    border-radius: 22px !important;
    box-shadow: 0 7px 34px 0 rgba(67, 48, 137, 0.11), 0 1.5px 4px 0 rgba(67, 48, 137, 0.08);
}

.form-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #232867;
    text-align: center;
}

.submit-button {
    background: linear-gradient(90deg, #3641b7 0%, #232867 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 13px 0;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 1.5px 13px rgba(54, 65, 183, 0.08);
    margin-top: 6px;
}

.submit-button:hover {
    background: #3641b7;
}


/* ==== RESPONSIVE ==== */
@media (max-width: 700px) {
    .container {
        margin-top: 24px;
        padding: 16px 2vw;
    }

    .header {
        gap: 6px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    #cust {
        font-size: 0.99em;
        gap: 12%;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 8px 1vw;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .selected-subject {
        font-size: 0.96em;
    }

    #cust {
        gap: 4%;
        padding: 11px 0;
    }

    .cust-button,
    #confirm-button {
        padding: 8px 8vw;
    }
}