/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.main-header {
    background-color: transparent;
    color: #333;
    padding: 1px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.3rem;
        gap: 8px;
    }
}

.separator {
    color: #7f8c8d;
    font-weight: normal;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #f1f1f1;
    color: #3498db;
}

.nav-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-time {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
    background: none !important;
    padding: 0;
    border-radius: 0;
    display: inline-block;
    margin: 0 5px;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-block;
    border: none;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-link {
    background-color: transparent;
    color: #2c3e50;
    border: none;
    padding: 8px 12px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-link:hover {
    background-color: #f1f1f1;
    color: #3498db;
}



/* Hero Section Styles */
.hero-section {
    background-color: transparent;
    color: #333;
    padding: 20px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Search Container Styles */
.search-container {
    margin: 0 auto;
    text-align: center;
    max-width: 700px;
}

/* 新的搜索包装器样式 */
.search-wrapper {
    margin: 0 auto;
    text-align: center;
    max-width: 700px;
}

.search-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    max-width: 600px;
}

.search-form {
    display: flex;
    flex: 1;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: 1px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#search-form {
    display: flex;
}

#search-input {
    flex: 1;
    padding: 15px 25px;
    border: 1px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
}

#search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* Message Styles */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 1.1em;
    text-align: center;
}

.message.success {
    color: #270;
    background-color: #DFF2BF;
}

.message.error {
    color: #D8000C;
    background-color: #FFBABA;
}

/* Section Header Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 5px;
    padding-bottom: 2px;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
    padding: 0;
}

/* User Section Styles */
.user-section {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-item {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    position: relative;
}

.link-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 20px; /* Increased font size */
}

.link-item a:hover {
    background-color: #f1f1f1;
    color: #3498db;
}

.link-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.link-actions {
    position: absolute;
    top: -8px;
    right: -8px;
    display: none;
    gap: 3px;
}

.link-item:hover .link-actions {
    display: flex;
}

.edit-btn, .delete-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
}

.delete-btn {
    background-color: #e74c3c;
}

/* Public Section Styles */
.public-section {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Empty Links Styles */
.empty-links {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.notice {
    text-align: center;
    padding: 15px;
    color: #7f8c8d;
    font-style: italic;
}

/* 登录注册模态框独立样式 */
#login-modal,
#register-modal {
    display: none !important;
    position: fixed !important;
    z-index: 1000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(2px) !important;
}

#login-modal.show,
#register-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#login-modal .modal-content,
#register-modal .modal-content {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 450px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    animation: modalSlideIn 0.3s ease-out !important;
    border: 1px solid #e5e7eb !important;
    max-height: none !important;
    overflow-y: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Styles - 浅蓝色扁平风格 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
    max-height: 75vh;
    overflow-y: auto;
}

/* 移除了错误的日程模态框样式，因为日程表不在模态框中显示 */

#login-modal .modal-header,
#register-modal .modal-header {
    padding: 24px 24px 0 24px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

#login-modal .modal-header h3,
#register-modal .modal-header h3 {
    margin: 0 0 16px 0 !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    letter-spacing: -0.02em !important;
}

#login-modal .close,
#register-modal .close {
    color: #9ca3af !important;
    position: absolute !important;
    right: 20px !important;
    top: 20px !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    background: none !important;
    border: none !important;
    padding: 4px !important;
    line-height: 1 !important;
    z-index: 1001 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    display: inline !important;
}

#login-modal .close:hover,
#register-modal .close:hover {
    color: #6b7280 !important;
    background-color: transparent !important;
    transform: none !important;
}

#login-modal .modal-body,
#register-modal .modal-body {
    padding: 24px !important;
}

#login-modal .form-group,
#register-modal .form-group {
    margin-bottom: 20px !important;
}

#login-modal .form-group:last-child,
#register-modal .form-group:last-child {
    margin-bottom: 0 !important;
}

#login-modal .form-group label,
#register-modal .form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    font-size: 14px !important;
}

#login-modal .btn,
#register-modal .btn {
    display: inline-block !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#login-modal .btn-primary,
#register-modal .btn-primary {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

#login-modal .btn-primary:hover,
#register-modal .btn-primary:hover {
    background-color: #2563eb !important;
    transform: none !important;
}

#login-modal .btn-primary:focus,
#register-modal .btn-primary:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

#login-modal .text-center,
#register-modal .text-center {
    text-align: center !important;
}

#login-modal .mt-3,
#register-modal .mt-3 {
    margin-top: 1rem !important;
}

#login-modal a,
#register-modal a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

#login-modal a:hover,
#register-modal a:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.modal-header {
    padding: 12px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.close {
    color: #6b7280;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close:hover,
.close:focus {
    color: #374151;
    background-color: #f9fafb;
    transform: none;
}

.modal-body {
    padding: 0 20px 16px 20px;
}

.modal-body .form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 200px !important;
    box-sizing: border-box !important;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1f2937;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:hover {
    border-color: #9ca3af;
}

.btn {
    font-family: inherit;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    background-color: #1d4ed8;
    transform: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.form-footer {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.form-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.form-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

/* 登录注册模态框独立样式 */
#login-modal .form-control,
#register-modal .form-control {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    color: #1f2937 !important;
    min-height: auto !important;
    resize: none !important;
}

#login-modal .form-control:focus,
#register-modal .form-control:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

#login-modal .form-control:hover,
#register-modal .form-control:hover {
    border-color: #9ca3af !important;
}

/* 认证页面样式 */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 98vw;
        padding: 10px;
    }
    .auth-container .form-control {
        min-width: 0;
    }
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-container .form-group {
    margin-bottom: 16px;
}

.auth-container .form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 200px !important;
    box-sizing: border-box !important;
}

.auth-container .btn-block {
    margin-top: 20px;
}

.auth-container .form-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.auth-container .message {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-container .message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-container .message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 页脚样式 */
.main-footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-text {
    color: #6c757d;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #007bff;
}

/* 网站Logo样式 */
.site-logo {
    max-height: 50px;
    max-width: 200px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 登录注册模态框独立响应式样式 */
    #login-modal .modal-content,
    #register-modal .modal-content {
        width: 95% !important;
        max-width: 350px !important;
        margin: 8% auto !important;
        max-height: 70vh !important;
    }
    
    #login-modal .modal-header,
    #register-modal .modal-header {
        padding: 10px 16px !important;
    }
    
    #login-modal .modal-header h3,
    #register-modal .modal-header h3 {
        font-size: 1.1rem !important;
    }
    
    #login-modal .modal-body,
    #register-modal .modal-body {
        padding: 0 16px 12px 16px !important;
    }
    
    #login-modal .form-group,
    #register-modal .form-group {
        margin-bottom: 10px !important;
    }
    
    #login-modal .form-control,
    #register-modal .form-control {
        padding: 8px 12px !important;
        font-size: 16px !important; /* 防止iOS缩放 */
    }
    
    #login-modal .btn-primary,
    #register-modal .btn-primary {
        padding: 10px 16px !important;
        font-size: 16px !important;
    }
    
    #login-modal .close,
    #register-modal .close {
        right: 16px !important;
        top: 16px !important;
        font-size: 20px !important;
    }
    
    /* 通用模态框响应式样式（保持向后兼容） */
    .modal-content {
        width: 95%;
        max-width: 350px;
        margin: 8% auto;
        max-height: 70vh;
    }
    
    /* 移除了错误的日程模态框小屏幕样式 */
    
    .modal-header {
        padding: 10px 16px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0 16px 12px 16px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .btn-primary {
        padding: 10px 16px;
        font-size: 16px;
    }
    
    .form-footer {
        margin-top: 10px;
        padding-top: 10px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        max-width: 320px;
        margin: 10% auto;
        max-height: 65vh;
    }
    
    /* 移除了错误的日程模态框超小屏幕样式 */
    
    .modal-header {
        padding: 8px 14px;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 0 14px 10px 14px;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .form-group label {
        margin-bottom: 3px;
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 8px 10px;
    }
    
    .form-footer {
        margin-top: 8px;
        padding-top: 8px;
    }
    
    .form-footer p {
        font-size: 0.8rem;
    }
}

.form-footer a:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* Toast Message Styles - 现代扁平化风格 */
.toast-message {
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.toast-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.toast-message.success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.toast-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.toast-message.info {
    background-color: #f0f9ff;
    color: #0c4a6e;
    border-left: 4px solid #7dd3fc;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styles */
.main-footer {
    background-color: #f8f9fa;
    color: #495057;
    padding: 30px 0 15px;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section h3 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-section p {
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 主内容分栏布局 */
.main-content-split {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.public-links-panel {
    flex: 2.5; /* 调整为占据更多宽度 */
    min-width: 0; /* 防止flex项目溢出 */
}

.schedule-panel {
    flex: 1.2; /* 适度减少宽度 */
    min-width: 350px; /* 适度减少最小宽度 */
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    position: static; /* 改为静态定位，不再固定 */
    max-height: none; /* 移除最大高度限制 */
    overflow-y: visible; /* 移除垂直滚动条 */
}

.schedule-panel .section-header {
    margin-bottom: 15px;
}

.schedule-panel .section-header h2 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content-split {
        flex-direction: column;
    }
    
    .schedule-panel {
        position: static;
        max-height: none;
        margin-top: 20px;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .current-time {
        font-size: 0.8rem;
    }
    
    .main-content-split {
        gap: 15px;
    }
    
    .schedule-panel {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .links-list {
        gap: 8px;
    }
    
    .search-form-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .search-input {
        border-radius: 30px;
    }
    
    .search-btn {
        border-radius: 30px;
        padding: 15px;
    }
    
    #search-form {
        flex-direction: column;
    }
    
    #search-input {
        border-radius: 30px;
        margin-bottom: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin: 15px 0 8px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .public-section,
    .user-section {
        padding: 12px;
    }
    
    .auth-container {
        margin: 20px auto;
        padding: 20px;
        max-width: 90%;
    }
    
    .auth-container h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .modal-content {
        width: 85%;
        max-width: 260px;
        padding: 12px;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .link-item a {
        padding: 5px 8px;
        font-size: 0.9rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .main-nav ul {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .main-nav a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .link-favicon {
        width: 14px;
        height: 14px;
    }
    
    .modal-content {
        width: 92%;
        max-width: 220px;
        margin: 15% auto;
        padding: 10px;
    }
    
    .modal-header {
        padding: 12px 15px 8px 15px;
    }
    
    .modal-body {
        padding: 8px 15px 15px 15px;
    }
}

/* 编辑模式样式 */
.edit-mode .link-item {
    position: relative;
    border: 2px dashed transparent;
    transition: all 0.3s ease;
    cursor: move;
}

.edit-mode .link-item:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.edit-mode .link-anchor {
    pointer-events: none;
}

/* 拖拽手柄样式 - 已移除，现在整个链接项可拖拽 */

/* 链接项目结构调整 */
.edit-mode .link-item {
    display: flex;
    align-items: center;
    position: relative;
    cursor: grab;
}

.edit-mode .link-item:active {
    cursor: grabbing;
}

.link-content {
    flex: 1;
}

.link-actions {
    margin-left: 10px;
    display: flex;
    gap: 5px;
}

.link-actions button {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.link-actions .edit-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.link-actions .delete-btn:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* 拖拽状态样式 */
.sortable-ghost {
    opacity: 0.3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px dashed #2196f3;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.sortable-chosen {
    transform: rotate(3deg) scale(1.05);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.3);
    border: 2px solid #2196f3;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.sortable-drag {
    transform: rotate(8deg) scale(1.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 3px solid #ff5722;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
}

/* 拖拽时的脉冲动画 */
.sortable-chosen::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #2196f3, #03a9f4);
    border-radius: inherit;
    z-index: -1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* 拖拽时的全局状态 */
body.dragging-active {
    cursor: grabbing !important;
    user-select: none;
}

body.dragging-active * {
    cursor: grabbing !important;
}

/* 拖拽开始时的动画 */
.drag-starting {
    animation: dragStart 0.3s ease-out;
}

@keyframes dragStart {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* 可放置区域提示 */
.drop-zone {
    border: 2px dashed #4caf50 !important;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
    transform: scale(0.98);
    transition: all 0.3s ease;
    position: relative;
}

.drop-zone::after {
    content: '放置到这里';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    animation: dropHint 2s infinite;
}

@keyframes dropHint {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* 添加链接容器样式 */
.add-link-container {
    margin-top: 20px;
    text-align: center;
}

.add-link-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.add-link-btn i {
    font-size: 14px;
}

/* 编辑提示样式 */
.edit-tips {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.edit-tips p {
    margin: 0;
    color: #1565c0;
    font-weight: 500;
}

.edit-tips i {
    margin-right: 8px;
    color: #2196f3;
}

/* 编辑模式按钮样式 */
.manage-links-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.manage-links-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.finish-edit-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.finish-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .edit-mode .link-item {
        margin-left: 0;
    }
    
    .drag-handle {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-right: 10px;
    }
    
    .delete-zone {
        padding: 30px 15px;
    }
    
    .delete-zone i {
         font-size: 1.5rem;
     }
 }
 
 /* 编辑表单样式 */
 .edit-form, .add-link-form {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 10px;
     background: #f8f9fa;
     border: 2px solid #007bff;
     border-radius: 8px;
     margin: 5px 0;
 }
 
 .edit-inputs {
     display: flex;
     gap: 8px;
     flex: 1;
 }
 
 .edit-inputs input {
     flex: 1;
     padding: 8px 12px;
     border: 1px solid #ddd;
     border-radius: 4px;
     font-size: 14px;
     transition: border-color 0.2s ease;
 }
 
 .edit-inputs input:focus {
     outline: none;
     border-color: #007bff;
     box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
 }
 
 .edit-buttons {
     display: flex;
     gap: 5px;
 }
 
 .edit-buttons button {
     padding: 8px 10px;
     border: none;
     border-radius: 4px;
     cursor: pointer;
     transition: all 0.2s ease;
     font-size: 14px;
 }
 
 .save-edit-btn, .save-add-btn {
     background: #28a745;
     color: white;
     padding: 8px 12px;
     min-width: 60px;
 }
 
 .save-edit-btn:hover, .save-add-btn:hover {
     background: #218838;
     transform: translateY(-1px);
 }
 
 .delete-edit-btn {
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    min-width: 60px;
}

.delete-edit-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.cancel-edit-btn, .cancel-add-btn {
    background: #6c757d;
    color: white;
    padding: 8px 12px;
    min-width: 60px;
}

.cancel-edit-btn:hover, .cancel-add-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}
 
 /* 添加链接项样式 */
 .add-link-item {
     border: 2px dashed #28a745;
     background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
     border-radius: 8px;
     margin-bottom: 15px;
 }
 
 /* CalDAV测试结果样式 */
.test-result {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
}

.test-result pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: inherit;
}

.test-result.success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.test-result.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.test-result.info {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.test-result.partial {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* 通知样式 */
.notification {
    display: flex;
    align-items: center;
    min-width: 300px;
}

.notification-content {
     display: flex;
     align-items: center;
     gap: 10px;
 }
 
 .notification-content i {
     font-size: 16px;
 }
 
 /* 响应式编辑表单 */
 @media (max-width: 768px) {
     .edit-form, .add-link-form {
         flex-direction: column;
         align-items: stretch;
     }
     
     .edit-inputs {
         flex-direction: column;
     }
     
     .edit-buttons {
         justify-content: center;
     }
 }

/* 用户头像样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: border-color 0.3s ease;
}

.user-avatar:hover {
    border-color: #007bff;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-weight: 500;
    color: #333;
}

/* 头像选择模态框样式 */
.avatar-section {
    margin-bottom: 30px;
}

.avatar-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.avatar-option:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.upload-area:hover {
    border-color: #007bff;
}

#avatar-upload {
    display: none;
}

.upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 16px;
}

.upload-label i {
    font-size: 24px;
    color: #007bff;
}

.upload-label:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .avatar-option {
        width: 50px;
        height: 50px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .username {
        font-size: 14px;
    }
}