/* General body styling */
html {
    font-family: Arial, sans-serif; /* Sets the default font to Arial, with a sans-serif fallback */
    margin: 0; /* Removes default margin */
    padding: 0; /* Removes default padding */
    background-color: #f4f4f4; /* Sets a light grey background color for the body */
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif; /* Sets the default font to Arial, with a sans-serif fallback */
    margin: 0; /* Removes default margin */
    padding: 0; /* Removes default padding */
    /* Sets a light grey background color for the body */
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f4f4f4 url("/web_assignment_war_exploded/resources/images/background.jpg") no-repeat center center fixed;
    background-size: cover; /* Ensures the background image covers the entire area without distortion */
}

/* Header styling */
header {
    background-color: rgba(51, 51, 51, 0.8); /* Dark background color with 80% opacity */
    color: #fff; /* White text color for the header */
    padding: 1em 0; /* Adds vertical padding to the header */
    text-align: center; /* Centers the text within the header */
    position: relative; /* Ensures the header is above the blurred background */
    z-index: 1;
}

/* Navigation list styling */
nav ul {
    list-style-type: none; /* Removes bullet points from the list */
    padding: 0; /* Removes padding from the list */
}

/* Navigation list item styling */
nav ul li {
    display: inline; /* Displays list items in a horizontal line */
    margin: 0 1em; /* Adds margin between list items */
}

/* Styling for links within the navigation list */
nav ul li a {
    color: #fff; /* White text color for the links */
    text-decoration: none; /* Removes underline from the links */
}

/* Main content area styling */
main {
    padding: 2em; /* Adds padding around the main content */
    flex: 1;
    z-index: 1;
    position: relative; /* Ensures the main content is above the blurred background */
}

/* Footer styling */
footer {
    background-color: rgba(51, 51, 51, 0.8); /* Dark background color with 80% opacity */
    color: #fff; /* White text color for the footer */
    text-align: center; /* Centers the text within the footer */
    padding: 1em 0; /* Adds vertical padding to the footer */
    width: 100%; /* Ensures the footer spans the full width of the page */
    position: relative; /* Ensures the footer is above the blurred background */
    z-index: 1;
}

/* Project list styling */
.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-list li, .liButton {
    background-color: #fff;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.project-button {
    background-color: #fff;
    border: 1px solid #ddd;
    margin: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    display: inline-block;
    width: auto; /* 调整按钮宽度，使其不占满整行 */
}

.project-button:hover {
    background-color: #f0f0f0;
}

/* 按钮样式 */
.project-button {
    background-color: #fff;
    border: 1px solid #ddd;
    margin: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    display: inline-block;
    width: auto;
}

.project-button:hover {
    background-color: #f0f0f0;
}

/* 保存按钮样式 */
#saveButton, .saveButton {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#saveButton:hover {
    background-color: #0056b3;
}

.btn {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #555;
}

.edit-button {
    background-color: #4CAF50; /* 绿色背景 */
    color: white; /* 白色文字 */
    border: none; /* 无边框 */
    padding: 10px 20px; /* 内边距 */
    text-align: center; /* 文字居中 */
    text-decoration: none; /* 无下划线 */
    display: inline-block; /* 行内块 */
    font-size: 16px; /* 字体大小 */
    margin: 4px 2px; /* 外边距 */
    cursor: pointer; /* 鼠标指针 */
    border-radius: 4px; /* 圆角 */
    transition: background-color 0.3s; /* 背景色过渡效果 */
}

.edit-button:hover {
    background-color: #45a049; /* 悬停时背景颜色 */
}

.cancel-button {
    background-color: #ffffff; /* 红色背景 */
    color: #000000; /* 黑色文字 */
    border: none; /* 无边框 */
    padding: 10px 20px; /* 内边距 */
    text-align: center; /* 文字居中 */
    text-decoration: none; /* 无下划线 */
    display: inline-block; /* 行内块 */
    font-size: 16px; /* 字体大小 */
    margin: 4px 2px; /* 外边距 */
    cursor: pointer; /* 鼠标指针 */
    border-radius: 4px; /* 圆角 */
    transition: background-color 0.3s; /* 背景色过渡效果 */
}

.cancel-button:hover {
    background-color: #d2d2d2; /* 悬停时背景颜色 */
}

.project-list li:hover, .liButton:hover {
    background-color: #f0f0f0;
}

.project-form label {
    display: block;
    margin-bottom: 10px;
}

.project-form input, .project-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.project-form textarea {
    resize: vertical;
}


/* Project list item styling */
#project-list, #user-list {
    font-family: Arial, sans-serif;
    background-color: rgba(249, 249, 249, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 80%; /* 修改为百分比宽度，自适应屏幕 */
    margin: 20px auto;
    text-align: center;
}

#user-list {
    font-family: Arial, sans-serif;
    background-color: rgba(249, 249, 249, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 80%; /* 修改为百分比宽度，自适应屏幕 */
    margin: 20px auto;
    text-align: center;
    min-height: 40vh;
}

#project-list h1 {
    color: #333;
    margin-bottom: 20px;
}

#project-details, #user-info {
    font-family: Arial, sans-serif;
    background-color: rgba(249, 249, 249, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 80%; /* 修改为百分比宽度，自适应屏幕 */
    margin: 20px auto;
}

#project-details h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item p {
    margin: 0;
    color: #555;
}

.detail-item strong {
    color: #333;
}

.detail-item a {
    color: #007bff;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* 通用样式 */
.project-form, #user-info-edit {
    font-family: Arial, sans-serif;
    background-color: rgba(249, 249, 249, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 80%; /* 修改为百分比宽度，自适应屏幕 */
    margin: 20px auto;
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
}

.project-form h2, #user-info-edit h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group-right {
    display: inline-block;
    width: calc(50% - 10px);
    margin-left: 10px;
    vertical-align: top;
}

/* 关键字样式 */
.form-group-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-group-keywords {
    display: inline-block;
    width: calc(50% - 10px);
    vertical-align: top;
}

.keywords-listbox {
    width: 100%;
    box-sizing: border-box;
    text-align: center; /* 使列表框内的文本居中 */
}

.keywords-listbox option {
    text-align: center; /* 使每个选项内的文本居中 */
}

/* Section styling for About Me */
#about-me {
    background-color: rgba(255, 255, 255, 0.8); /* 白色半透明背景 */
    padding: 20px; /* 内边距 */
    border-radius: 10px; /* 圆角边框 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 盒子阴影 */
    max-width: 80%; /* 设置最大宽度 */
    margin: 20px auto; /* 垂直外边距和水平居中 */
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
}

/* Heading styling for About Me */
#about-me h1 {
    color: #333; /* 文字颜色 */
    text-align: center; /* 居中对齐 */
    margin-bottom: 20px; /* 底部外边距 */
}

/* Paragraph styling for About Me */
#about-me p {
    line-height: 1.6; /* 行高 */
    margin-bottom: 15px; /* 底部外边距 */
    text-align: justify; /* 文本对齐 */
    color: #555; /* 文字颜色 */
}

