body {
    background-image: url('/images/trybackground2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Trebuchet MS'; 
    font-style: italic;
    font-weight: bold;
}

#title {
    font-size: 70px;
    width: 100%;
    margin: 2% auto 1% auto; 
    text-align: center;
    font-family: 'Trebuchet MS'; 
    font-style: italic;
    color: #17489c64;
    font-weight: bold; 
}

/* Title container styling */
.title-container {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.title-container h1 {
    font-family: 'Trebuchet MS'; 
    font-size: 48px;
    font-style: italic;
    font-weight: bold;
    color: #000;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, rgba(203, 238, 243, 0.7), rgba(244, 156, 187, 0.6));
    padding: 15px 35px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(136, 13, 30, 0.2);
    display: inline-block;
}

/* Login page styling */
#loginDiv {
    font-size: 22px;  
    width: 450px;  
    height: 450px; 
    margin: 0 auto 20px auto; 
    padding: 60px 40px 40px 40px;
    background: linear-gradient(135deg, rgba(203, 238, 243, 0.95), rgba(241, 156, 187, 0.85));
    border-radius: 50%; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 8px 32px rgba(242, 106, 141, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 5;
}

div#registerName {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    border-radius: 25px;
    overflow: hidden;
    width: 80%; 
}

.tab-button {
    flex: 1;
    padding: 10px 14px; 
    border: none;
    background-color: #f1f1f1;
    cursor: pointer;
    font-size: 16px; 
    font-family: 'Trebuchet MS'; 
    font-weight: bold;
    font-style: italic;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #DD2D4A;
    color: white;
}

.tab-button:hover {
    background-color: #F49CBB;
}

.tab-button.active:hover {
    background-color: #880D1E;
}

.tab-panel {
    display: none;
    width: 100%;
    text-align: center; 
}

.tab-panel.active {
    display: block;
}

/* Logged in user section */
#loggedInDiv {
    font-size: 24px;
    width: 80%;
    margin: 20px auto;
    padding: 20px;
    background: rgba(203, 238, 243, 0.8);
    border-radius: 25px;
    text-align: center;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(136, 13, 30, 0.2);
}

/* Main UI container */
#accessUIDiv {
    background: rgba(203, 238, 243, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 20px;
    width: 80%;
    /* max-width: 800px; */
    margin: 30px auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.searchbar-container {
    display: flex
;
    justify-content: center;
    align-items: center;
}

.separator {
    position: relative;
    width: 100%;
}

button#addContactButton {
    max-width: unset;
    width: 90%;
}

hr.hr-left, hr.hr-right {
    line-height: 1em;
    position: absolute;
    outline: 0;
    top: 0;
    left: 0;
    border: 0;
    color: #000;
    text-align: center;
    height: 1.5em;
    opacity: .5;
    width: 100%;
}

hr {
    display: block;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: auto;
    margin-inline-end: auto;
    color: gray;
    unicode-bidi: isolate;
    overflow: hidden;
    border-style: inset;
    border-width: 1px;
}

hr.hr-left:before {
    content: "";
    background: linear-gradient(90deg, transparent, red);
    position: absolute;
    left: 0;
    top: 50%;
    width: 47%;
    height: 2px;
}

hr.hr-right:before {
    content: "";
    background: linear-gradient(90deg, red, transparent);
    position: absolute;
    right: 0;
    top: 50%;
    width: 47%;
    height: 2px;
}

span.hr-text {
    position: relative;
    display: block;
    padding: 0 .5em;
    line-height: 1.5em;
    color: red;
    text-align: center;
    top: .5em;
}

/* Button styling */
.buttons {
    font-size: 18px; 
    border-radius: 25px;
    width: 65%; 
    max-width: 300px;
    margin: 12px auto;
    display: block;
    font-family: 'Trebuchet MS'; 
    font-weight: bold;
    font-style: italic;
    padding: 12px 18px; 
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.buttons:hover {
    background: linear-gradient(135deg, #DD2D4A, #F26A8D);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(221, 45, 74, 0.3);
}

/* Input field styling */
input[type="text"], 
input[type="password"],
input[type = "email"] {
    border-radius: 25px;
    text-align: center;
    width: 60%;
    max-width: 800px;
    margin: 10px auto;
    display: block;
    padding: 12px;
    font-family: 'Trebuchet MS';
    font-style: italic;
    font-size: 16px;
    border: 2px solid #ddd;
    background-color: rgba(255, 255, 255, 0.9);
}

/* Result message styling */
#loginResult, #registerResult, #contactSearchResult, #contactAddResult, #registerContact {
    display: block;
    font-size: 14px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    margin: 15px auto;
    font-family: 'Trebuchet MS';
    font-style: italic;
    font-weight: bold;
    min-height: 20px;
}

/* Username display */
#userName {
    display: inline-block;
    font-weight: bold;
    color: #000;
    font-size: 24px; 
    white-space: nowrap; 
}

/* Table styling */
table {
    width: 95%;
    margin: 30px auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    font-family: 'Trebuchet MS';
    font-weight: bold;
    font-style: italic;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

th {
    background: linear-gradient(135deg, #F49CBB, #DD2D4A);
    color: white;
    font-size: 16px;
}

td {
    font-size: 14px;
    color: #333;
}

/* Action buttons in table */
.action-btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Trebuchet MS';
    font-weight: bold;
    font-style: italic;
    font-size: 11px;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #4CAF50;
    color: white;
}

.edit-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #da190b;
    transform: translateY(-1px);
}

/* Contact list paragraph styling (for old structure) */
#contactList {
    margin: 20px auto;
    text-align: center;
    min-height: 100px;
}

#contactList table {
    margin: 10px auto;
}

/* Section headers */
h3 {
    font-family: 'Trebuchet MS';
    font-style: italic;
    font-weight: bold;
    color: #DD2D4A;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6)
}

.modal-content {
    background: linear-gradient(135deg, rgba(203, 238, 243, 0.95), rgba(244, 156, 187, 0.9));
    margin: 10% auto; 
  padding: 20px;
  border-radius: 20px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 25px rgba(136, 13, 30, 0.3);
  text-align: center;
}

/* Close button */
.close-btn {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #880D1E;
}

.close-btn:hover {
  color: black;
}

.modal-content label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

.modal-content input {
  width: 90%;
  padding: 8px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family:'Trebuchet MS'; 
  font-style:italic;
}



/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .title-container h1 {
        font-size: 36px;
        padding: 12px 25px;
    }
    
    #loggedInDiv {
        width: 95%;
        font-size: 20px;
        padding: 15px;
    }
    
    #accessUIDiv {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }
    
    .buttons {
        width: 80%;
        font-size: 16px;
        padding: 12px;
    }
    
    input[type="text"], 
    input[type="password"] {
        width: 85%;
        padding: 12px;
        font-size: 16px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media screen and (max-width: 480px) {
    .title-container h1 {
        font-size: 28px;
        padding: 10px 20px;
    }
    
    #accessUIDiv {
        width: 98%;
        padding: 15px;
    }
    
    .buttons {
        width: 90%;
        font-size: 14px;
    }
    
    input[type="text"], 
    input[type="password"] {
        width: 90%;
        padding: 10px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px;
    }
    
    .action-btn {
        padding: 3px 6px;
        font-size: 9px;
    }
}

