@import url('https://fonts.googleapis.com/css2?family=Amiri&display=swap');

/* Applying the styleOne pattern to the entire web page */
body {
    background-color: #eddfab;
    background-image:
        linear-gradient(67.5deg, #eddfab 10%, transparent 10%),
        linear-gradient(157.5deg, #eddfab 10%, transparent 10%),
        linear-gradient(67.5deg, transparent 90%, #eddfab 90%),
        linear-gradient(157.5deg, transparent 90%, #eddfab 90%),
        linear-gradient(22.5deg, #eddfab 10%, transparent 10%),
        linear-gradient(112.5deg, #eddfab 10%, transparent 10%),
        linear-gradient(22.5deg, transparent 90%, #eddfab 90%),
        linear-gradient(112.5deg, transparent 90%, #eddfab 90%),
        linear-gradient(22.5deg, transparent 33%, #d5d8dc 33%, #d5d8dc 36%, transparent 36%, transparent 64%, #d5d8dc 64%, #d5d8dc 67%, transparent 67%),
        linear-gradient(-22.5deg, transparent 33%, #d5d8dc 33%, #d5d8dc 36%, transparent 36%, transparent 64%, #d5d8dc 64%, #d5d8dc 67%, transparent 67%),
        linear-gradient(112.5deg, transparent 33%, #eddfab 33%, #d5d8dc 36%, transparent 36%, transparent 64%, #d5d8dc 64%, #d5d8dc 67%, transparent 67%),
        linear-gradient(-112.5deg, transparent 33%, #eddfab 33%, #d5d8dc 36%, transparent 36%, transparent 64%, #eddfab 64%, #d5d8dc 67%, transparent 67%);
    background-size: 250px 250px;
    background-position: 
        -100px 150px, -150px 150px, -150px 100px, -100px 100px,
        -150px 100px, -100px 100px, -100px 150px, -150px 150px,
        0 0, 0 0, 0 0, 0 0;
    font-family: 'Amiri', serif;
    text-align: center;
    padding-top: 50px;
    direction: ltr;
    color: #d5d8dc;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    overflow-y: auto; /* Enable vertical scrolling */
}
h1 {
    margin-bottom: 20px;
    font-size: 32px;
    color: #333;
}
.instruction {
    margin-bottom: 10px;
    font-size: 18px;
    color: #555;
}
.container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: auto;
    justify-content: flex-start;
}
textarea {
    width: 400px;
    height: 100px;
    padding: 10px;
    border: groove;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 20px;
    color: #555;
    font-family: "Traditional Naskh Arabic", Arial, sans-serif;
    direction: rtl;
}
.button-container {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}
button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: outset;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.remove-button {
    background-color: #E57373;
}
#combinedNamesContainer {
    margin-top: 30px;
    width: 60%;
    padding: 10px;
    background-color: white;
    border: groove;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 20px;
    color: #555;
    text-align: center;
    font-family: "Traditional Naskh Arabic", Arial, sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.combined-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    position: relative;
}
.box {
    width: 200px;
    padding: 10px;
    background-color: white;
    border: 2px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    color: #555;
    text-align: center;
    font-family: "Traditional Naskh Arabic", Arial, sans-serif;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.box:hover {
    transform: scale(1.05);
}
.box::before, .box::after {
    content: '';
    position: absolute;
    border-top: 2px solid #ccc;
    top: -10px;
    width: 50%;
}
.box::before {
    left: -50%;
}
.box::after {
    right: -50%;
}
.box:first-child::before {
    display: none;
}
.box:last-child::after {
    display: none;
}
.combined-row::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background-color: #ccc;
    transform: translateX(-50%);
}
#combinedNamesContainer > .combined-row:first-child::before {
    display: none;
}
.highlight {
    padding: 2px 4px;
    border-radius: 30px;
    color: white;
}
.green { background-color: #8BC34A; }
.blue { background-color: #64B5F6; }
.yellow { background-color: #FFEB3B; }
.orange { background-color: #FF9800; }
.red { background-color: #E57373; }
.chocolate { background-color: #D2691E; }
table {
    border-collapse: collapse;
    margin-top: 20px;
    width: 400px;
}
table, th, td {
    border: groove;
    padding: 10px;
    text-align: center;
    color: #555;
}
th {
    background-color: #f4f4f4;
}
.modal {
    display: none; 
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 60px;
}
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    border: groove;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-family: "Traditional Naskh Arabic", Arial, sans-serif;
    color: #555;
}
.modal-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}
.modal-content p {
    font-size: 18px;
    line-height: 1.6;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    color: #555;
    font-weight: bold;
    cursor: pointer;
}
.close:hover, .close:focus {
    color: #000;
    text-decoration: none;
}
