h1, h2, h3, h4, p {
    margin: 0%;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: "Share Tech Mono", monospace;
    font-weight: 400;
    font-style: normal;
    font-size: 1em;
}

body {
    background-color: #F9F6F1;
}

h1 {
    font-size: 1.8em;
}

h2 {
    font-size: 1.3em;
    color: #1A3B4C;
}

h3 {
  font-size: 1.1em;
  color: #1A3B4C;
}

h4 {
  font-size: 1em;
}

p, label {
    font-size: 0.9em;
}

input {
    font-size: 1em;
}

button {
    font-size: 1em;
}

header h1 {
    color: #1A3B4C;
    padding: 15px 0;
    text-align: center;
    border-bottom: 4px solid #731A1A;
}

header {
    margin-bottom: 75px;
}

.container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin: 50px;
}

.left {
    display: flex;
    flex-direction: column;
    flex: 25%;
    gap: 20px;
    height: 800px;
    text-align: center;
}

.box-add {
    flex: 2 2 0;
    background-color: #fffaf5;          
    border: 2px solid #F2B134;     
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.box-total {
    flex: 0 0 200px;
    background-color: #fffaf5;          
    border: 2px solid #F2B134;    
    color: #3A1C00;                
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.right {
    flex: 75%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.year {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    border-radius: 12px;
    padding: 15px 20px;
    border-top: 4px solid #F2B134;
    background: #731A1A;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.year > h2:first-of-type {
    color: white;
}

.semesters {
    display: flex;
    flex-direction: row;
    flex: 1;
    gap: 40px;
}

.semester {
    display: flex;
    flex-direction: column;
    flex: 1 1 0px; /* fills available space evenly */
    gap: 20px;
    background-color: #FFFFFF;          
    border: 2px solid #BCA56A;
    border-radius: 12px;
    padding: 15px 20px 10px 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.classes {
    display: flex;
    flex-direction: column;
    width: 100%; 
    gap: 20px;
}

.box {
    display: flex;
    flex-direction: column;
    flex: 1 1 20px;
    background-color: #fffaf5;
    border: 2px solid #bab8b4;
    padding: 5px 20px;
    border-radius: 12px;
    text-align: left;
    gap: 10px;
}

.box:hover {
    border-color: #F2B134;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: scale(1.01);
    transition: 0.2s ease;
}

.boxDesc {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.boxDesc p{
    color: #A32626;
}

.openBtn, .closeBtn {
    display: flex; 
    align-items: center; 
    border: none;
    background: none;
    cursor: pointer;
    padding-left: 5px;
    padding-right: 7px;
    color: #3A1C00;
    font-weight: 500;
    margin-top: auto;
}


.openBtn:hover, .closeBtn:hover {
    border-radius: 12px;
    background-color:#ecebe9;
}

img {
    margin-right: 8px;
    width: 30px;
    height: 30px;
}

dialog::backdrop {
    background-color: rgba(37, 36, 36, 0.2); /* much lighter tint */
    transition: opacity 0.3s ease;
  
}

dialog {
    max-width: 490px;
    height: 560px;
    border-radius: 8px;
    padding: 15px;
    border: none;
    background-color: #fffaf5;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.df-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    gap: 20px;
    justify-content: space-between; /* makes top form + bottom button stretch vertically */
}

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

form {
    margin-top: 10%;
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 15px;
}

.row1 {
    display: flex;
    flex-direction: column;
    padding: 7px;
    border-radius: 5px;
    gap: 8px;
}

.row2 {
    display: flex;
    padding: 7px;
    gap: 20px;
    flex-wrap: wrap;
}

.check {
    display: flex;
    flex-wrap: wrap;
}

.hidden-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-label {
    display: inline-block;
    background-color: #f2b134;
    color: #3a1c00;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-label.custom-label:hover{
    background-color: #d18f00;
}

.hidden-checkbox:checked + .custom-label {
    background-color: #d18f00; /* darker yellow when active */
}


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

@media (max-width: 480px) {
    .container{
        flex-direction: column;
        margin: 10px 0px;
    }
    
    .box-add{
        flex: 2;
    }

    .box-total{
        flex: 1;
    }

    dialog {
        max-width: 80%;
        height: 90vh;
    }
}





