body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f1f1f1;
}

/* -------- Container -------- */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

@media (max-width: 600px) {
    .container {
        flex-direction: column;      /* whole container becomes vertical */
        align-items: center;         /* keep stack centered */
        justify-content: center;
    }

    .controls-left {
        flex-direction: row;         /* buttons side by side */
        justify-content: center;
        margin-bottom: 15px;         /* spacing from stack */
    }

    .colors-right {
        flex-direction: row;         /* colors in a row */
        justify-content: center;
        margin-top: 15px;            /* spacing below stack */
    }
}

@media (min-width: 600px){
    .controls-left{
        /* display: flex; */
    flex-direction: column;
    }

    .colors-right{
        /* display: flex; */
        flex-direction: column;
    }
}
/* -------- Left Controls -------- */
.controls-left {
    display: flex;
    gap: 10px;
}

.controls-left button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* -------- Profile Card -------- */
.stack {
    position: relative;
    width: 333px;
    height: 270px;
    overflow: hidden;
}
.card {
    position: absolute; /* stack on top of each other */
    top: 0;
    left: 0;
    width: 100%;
    max-width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 3px 10px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}
.stack {
    overflow: hidden; /* hide parts of cards sticking out */
}


/* Top card (active) */
.card:nth-child(1) {
    z-index: 3;
}

/* Second card */
.card:nth-child(2) {
    z-index: 2;
    transform: translateY(10px) scale(0.98);
    opacity: 0.9;
}

/* Third card */
.card:nth-child(3) {
    z-index: 1;
    transform: translateY(20px) scale(0.96);
    opacity: 0.8;
}

.profile-img img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.card h2 {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 15px;
}

.info p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.info span {
    font-weight: bold;
}

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

.buttons .call {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 8px 25px;
    border-radius: 16px;
    cursor: pointer;
}

.buttons .message {
    background-color: #ddd;
    border: none;
    padding: 8px 25px;
    border-radius: 16px;
    cursor: pointer;
}

/* -------- Right Colors -------- */
.colors-right {
    display: flex;
    gap: 10px;
}

.colors-right .color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
}

.colors-right .black {
    background-color: black;
}

.colors-right .purple {
    background-color: purple;
}

.colors-right .orange {
    background-color: orange;
}

.colors-right .teal {
    background-color: teal;
}

/* -------- Form (Hidden by default) -------- */
.form-container {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 25px;
    border-radius: 16px;
    width: 450px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

@media (max-width: 600px){
    .form-container {
        width: 86%;       /* take almost full width */
        max-height: 90vh; /* prevent going off-screen */
        overflow-y: auto; /* enable scrolling if content is too tall */
        padding: 15px;    /* reduce padding for mobile */
    }

    .category-options {
        flex-direction: row;   /* make categories in a row */
        flex-wrap: wrap;       /* allow wrapping if needed */
        gap: 8px;
    }

    .category {
        width: auto;           /* don’t fix width, adapt to content */
        flex: 1 1 45%;         /* two per row */
        justify-content: flex-start;
    }

    .form-container button {
        font-size: 14px;  /* slightly smaller buttons */
        padding: 10px;
    }
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-container label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

.form-container input[type="text"] {
    width: 100%;
    padding: 10px;
    border-radius: 15px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.category-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    font-weight: 100;
}

.category {
    width: 30%;
    border: 2px solid #ccc;
    border-radius: 20px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
}

.category input {
    margin-right: 8px;
}

.category.emergency {
    border-color: red;
    color: red;
}

.category.important {
    border-color: orange;
    color: orange;
}

.category.urgent {
    border-color: purple;
    color: purple;
}

.category.norush {
    border-color: gray;
    color: gray;
}

.form-container button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
}

.form-container button.create {
    background-color: black;
    color: white;
}

.form-container button.close {
    background-color: red;
    color: white;
}