body {
    font-family: 'Dancing Script', cursive, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.container {
    width: 80%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    color: #d32f2f;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* 我要祝福按钮样式 */
.wish-button-container {
    text-align: center;
    margin-bottom: 20px;
}

.wish-button {
    padding: 12px 25px;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wish-button:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-60px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 表单样式 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    width: 100%;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-family: Arial, sans-serif;
}

.form-group select,
.form-group input,
.form-group textarea {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    font-family: Arial, sans-serif;
}

#messageForm button {
    padding: 12px;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    width: 100%;
    font-family: Arial, sans-serif;
}

#messageForm button:hover {
    background-color: #b71c1c;
}

#statusMessage {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
    color: #d32f2f;
}

#messageBoardWrapper {
    height: 400px;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
}

#messageBoard {
    position: absolute;
    width: 100%;
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.message {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.message:hover {
    transform: translateY(-5px);
}

.message .username {
    font-size: 1.2em;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 5px;
}

.message .username::after {
    content: " 祝福：";
    color: #388e3c;
    font-size: 0.9em;
    font-style: italic;
}

.message .content {
    font-size: 1em;
    color: #333;
    margin-bottom: 10px;
}

.message .time {
    font-size: 0.8em;
    color: #777;
    text-align: right;
}

/* 彩带效果 */
.ribbons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ribbon {
    position: absolute;
    width: 10px;
    height: 50px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #ff9a9e);
    animation: fall linear infinite;
    transform: rotate(-45deg);
}

@keyframes fall {
    0% {
        transform: translateY(-10%) rotate(-45deg);
    }
    100% {
        transform: translateY(110vh) rotate(-45deg);
    }
}

.ribbon:nth-child(1) {
    left: 5%;
    animation-duration: 10s;
}
.ribbon:nth-child(2) {
    left: 15%;
    animation-duration: 12s;
}
.ribbon:nth-child(3) {
    left: 25%;
    animation-duration: 8s;
}
.ribbon:nth-child(4) {
    left: 35%;
    animation-duration: 14s;
}
.ribbon:nth-child(5) {
    left: 45%;
    animation-duration: 9s;
}
.ribbon:nth-child(6) {
    left: 55%;
    animation-duration: 11s;
}
.ribbon:nth-child(7) {
    left: 65%;
    animation-duration: 7s;
}
.ribbon:nth-child(8) {
    left: 75%;
    animation-duration: 13s;
}
.ribbon:nth-child(9) {
    left: 85%;
    animation-duration: 10s;
}
.ribbon:nth-child(10) {
    left: 95%;
    animation-duration: 15s;
}

.school-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}



/* 祝福语消息样式 - 更新版 */
.message {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #d32f2f;
    position: relative;
    overflow: hidden;
}

.message:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.message-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: bold;
    color: #d32f2f;
    font-size: 1.1em;
    margin-bottom: 2px;
}

.user-details {
    display: flex;
    gap: 12px;
    font-size: 0.85em;
    color: #666;
}

.user-type {
    background: #e8f5e8;
    color: #388e3c;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
}

.user-affiliation {
    color: #666;
}

.user-gender {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.gender-icon {
    font-size: 0.9em;
}

.message-time {
    font-size: 0.8em;
    color: #888;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 15px;
    white-space: nowrap;
}

.message-content {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
    padding: 0 5px;
    font-style: italic;
    position: relative;
}

.message-content::before {
    /*content: """;*/
    font-size: 2em;
    color: #d32f2f;
    opacity: 0.3;
    position: absolute;
    left: -10px;
    top: -15px;
}

.message-content::after {
    /*content: """;*/
    font-size: 2em;
    color: #d32f2f;
    opacity: 0.3;
    position: absolute;
    right: -10px;
    bottom: -20px;
}

/* 类型颜色区分 */
.message[data-type="alumni"] {
    border-left-color: #ff6b6b;
}

.message[data-type="current"] {
    border-left-color: #4ecdc4;
}

.message[data-type="social"] {
    border-left-color: #45b7d1;
}

.user-type.alumni {
    background: #ffeaa7;
    color: #d35400;
}

.user-type.current {
    background: #d5f5e3;
    color: #27ae60;
}

.user-type.social {
    background: #d6eaf8;
    color: #2980b9;
}

/* 滚动动画优化 */
#messageBoard {
    animation: scroll 30s linear infinite;
}

#messageBoard:hover {
    animation-play-state: paused;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .message-time {
        align-self: flex-start;
    }

    .user-details {
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .message-content {
        font-size: 0.95em;
    }
}

/* 空状态提示 */
.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.empty-message i {
    font-size: 3em;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}
/* 模态框样式 - 美化版 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.4s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    padding: 25px 30px;
    color: white;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close {
    color: white;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* 表单样式 - 美化版 */
#messageForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group.full-width {
    width: 100%;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label::after {
    content: '*';
    color: #d32f2f;
    margin-left: 2px;
}

.form-group select,
.form-group input,
.form-group textarea {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1em;
    font-family: 'Arial', sans-serif;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    transform: translateY(-2px);
}

.form-group select:hover,
.form-group input:hover,
.form-group textarea:hover {
    border-color: #cbd5e0;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* 提交按钮样式 */
.submit-button {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.submit-button:active {
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 表单验证样式 */
.form-group.error select,
.form-group.error input,
.form-group.error textarea {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功提示 */
.success-message {
    text-align: center;
    padding: 40px 20px;
    color: #38a169;
}

.success-message i {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        border-radius: 15px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.5em;
    }

    .modal-body {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .form-group select,
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }

    .close {
        top: 15px;
        right: 20px;
        font-size: 24px;
    }
}

/* 自定义滚动条 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
/* 毕业年份下拉列表样式 */
select#graduation_year {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* 毕业年份显示样式 */
.graduation-year {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 5px;
}

/* 下拉列表选项样式 */
select option {
    padding: 10px;
    font-size: 1em;
}

/* 响应式调整 */
@media (max-width: 600px) {
    select#graduation_year {
        padding-right: 40px;
        background-position: right 12px center;
    }
}
/* 响应式调整 */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .container {
        width: 95%;
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}