/* 基础样式重置与设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础字体和颜色设置 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 搜索区域样式 */
.search-container {
    display: flex;
    padding: 1.5rem 0;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin: 1rem 0;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-icon {
    color: #ff6b6b;
    margin-right: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1.4rem;
}

.search-content {
    flex: 1;
    width: 100%;
}

.search-hint {
    display: block;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.search-form {
    display: flex;
    width: 100%;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-right: none;
    border-radius: 12px 0 0 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #e53e3e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 主内容区样式 */
.main-content {
    padding: 1rem 0 3rem 0;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 卡片通用样式 */
.form-card, .list-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-card:hover, .list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 卡片头部样式 */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    justify-content: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.card-header .icon {
    margin-right: 0.75rem;
    color: #3b82f6;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

/* 表单样式 */
.submission-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-textarea {
    width: 100%;
    min-height: 140px;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    resize: vertical;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    background: #fafafa;
    transition: all 0.3s ease;
}

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

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 列表样式 */
.submissions-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.75rem;
    gap: 1rem;
    display: flex;
    flex-direction: column;
}

/* 自定义滚动条 */
.submissions-list::-webkit-scrollbar {
    width: 6px;
}

.submissions-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.submissions-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.submissions-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.submission-item {
    padding: 1.25rem;
    border: 2px solid #f8fafc;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: white;
}

.submission-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: #f8fafc;
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.submission-title {
    text-decoration: none;
    color: #1e40af;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.submission-title:hover {
    color: #3b82f6;
    transform: translateX(3px);
}

.submission-title:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: width 0.3s ease;
}

.submission-title:hover:after {
    width: 100%;
}

.submission-meta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submission-time {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* 状态提示样式 */
.no-submissions, .loading, .error-message {
    padding: 3rem 0;
    text-align: center;
    color: #6b7280;
}

.no-submissions .icon, .loading .icon, .error-message .icon {
    margin-bottom: 1rem;
    font-size: 4rem;
    opacity: 0.4;
}

.no-submissions p, .loading p, .error-message p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* 加载动画 */
.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示框样式 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 300px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* 成功提示框 */
.success-toast {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* 错误提示框 */
.error-toast {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .form-card, .list-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .search-container {
        padding: 1.25rem;
        margin: 0.75rem 0;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .form-card, .list-card {
        padding: 1.25rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .card-header .icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 12px;
        border-right: 2px solid #d1d5db;
        margin-bottom: 0.75rem;
    }
    
    .search-btn {
        border-radius: 12px;
        padding: 0.75rem;
    }
}

/* 链接容器样式 */
.link-container {
    text-align: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    padding: 1rem 0;
    margin: 0;
    width: 100%;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.3);
}

.link-container a {
    color: white;
    text-decoration: none;
    margin: 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.link-container a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* 迷你加载动画 */
.spinner.mini {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left-color: white;
    display: inline-block;
    margin-right: 0.75rem;
    animation: spin 1s linear infinite;
}