/* Blackboard theme */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to bottom right, #1a1a1a, #333333);
    min-height: 100vh;
    color: #ffffff;
}
/* 自定义提示框样式 */
.custom-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  animation: slideInDown 0.3s ease;
}

.custom-alert.show {
  display: block;
}

.alert-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

#alert-message {
    color: #333; /* 深灰色文字 */
    font-size: 16px;
    font-weight: 500;
}

#confirm-message {
    color: #333; /* 深灰色文字 */
    font-size: 16px;
    font-weight: 500;
}

.alert-ok {
    background-color: #2196F3; /* 蓝色按钮 */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.alert-ok:hover {
    background-color: #0D47A1; /* 深色 hover 效果 */
}

/* 确认对话框按钮容器 */
.confirm-buttons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

/* 取消按钮样式 */
.alert-cancel {
    background-color: #f5f7fa;
    color: #4e555f;
    border: 1px solid #e4e7ed;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.alert-cancel:hover {
    background-color: #e4e7ed;
}



/* 动画效果 */
@keyframes slideInDown {
  from {
    transform: translate(-50%, -70%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* 验证码弹窗样式 */
.captcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.captcha-modal.show {
  display: flex;
}

.captcha-content {
  background-color: white;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  animation: slideInDown 0.3s ease;
}

.captcha-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.captcha-code {
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 8px;
  color: #1a1a1a;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%);
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid #ddd;
  user-select: none;
  cursor: pointer;
}

.captcha-input {
  width: 180px;
  padding: 10px 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  text-align: center;
  letter-spacing: 4px;
  transition: border-color 0.3s ease;
}

.captcha-input:focus {
  border-color: #2196F3;
}

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

.captcha-btn {
  padding: 8px 20px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.captcha-submit {
  background-color: #2196F3;
  color: white;
}

.captcha-submit:hover {
  background-color: #0D47A1;
}

.captcha-cancel {
  background-color: #f5f7fa;
  color: #4e555f;
  border: 1px solid #e4e7ed;
}

.captcha-cancel:hover {
  background-color: #e4e7ed;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Form container */
.form-container {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.form-container textarea {
    width: 100%;
    box-sizing: border-box;
}

.form-container form {
    display: flex;
    gap: 15px;
   
   
   
}



.form-container .form-group:last-child {
    margin-bottom: 0;
    flex: 0 0 900px;
}
/* 按钮样式 */
.form-container button {
    height: 40px;
    margin-bottom: 0;
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.form-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.form-container button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}
.form-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
}



.form-group {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group textarea {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

.form-group input {
    height: 40px;
}

/* 固定姓名输入框宽度 */
#name {
    width: 100%;
}

/* 固定密码输入框宽度 */
#admin-password {
    flex: 0 0 150px;
}

.form-group textarea {
    width: 100%;
    height: 40px;
    resize: vertical;
    min-height: 20px;
    max-height: 500px;
}

.form-group button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-group button:hover {
    background-color: #45a049;
}

/* Login container */
.login-container {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.login-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* 错误提示信息样式 */
.error-message {
    color: red;
    font-size: 14px;
    margin-left: 10px;
}

/* 字数统计样式 */
.counter {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

/* 超字数时的样式 */
.counter.exceeded {
    color: red;
    font-weight: bold;
}

/* Messages container */
.messages-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: rgba(50, 50, 50, 0.3);
    border-radius: 10px;
    justify-content: center;
    min-height: 500px;
    overflow-y: auto;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Sticky note styles */
.message-card {
    background-color: #ffeb3b;
    color: #333333;
    padding: 15px;
    border-radius: 8px;
    width: 230px;
    height: 180px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/*
.message-card:nth-child(2n) {
    background-color: #4CAF50;
    transform: rotate(1deg);
}

.message-card:nth-child(3n) {
    background-color: #2196F3;
    transform: rotate(3deg);
}

.message-card:nth-child(4n) {
    background-color: #FF9800;
    transform: rotate(-3deg);
}
*/

.message-card:hover {
    transform: translateY(-5px) scale(1.05) rotate(0deg);
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.5);
}

.message-header {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #333333;
    word-wrap: break-word;
}

.message-content {
    font-size: 16px;
    margin-bottom: 10px;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.4;
}

.message-date {
    font-size: 12px;
    color: rgba(102, 102, 102, 0.7);
    position: absolute;
    bottom: 10px;
    right: 10px;
    margin: 0;
    padding: 0;
    border: none;
}

/* Delete button */
.delete-btn {
    background-color: #FF5252;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Clear all button */
.clear-all-btn {
    background-color: #FF5252;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-all-btn:hover {
    background-color: #FF1744;
}

.message-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background-color: #FF1744;
}

/* Responsive design */
@media (max-width: 768px) {
    .messages-container {
        flex-direction: column;
        align-items: center;
    }
    
    .message-card {
        width: 90%;
        max-width: none;
    }
}