/* 首页样式 */

/* 项目网格布局 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* 项目卡片样式 */
.project-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 项目标题样式 */
.project-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-md);
    color: var(--gray-800);
}

/* 项目元数据样式 */
.project-meta {
    color: var(--gray-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
}

.project-meta p {
    margin-bottom: var(--space-xs);
}

/* 项目操作按钮区域 */
.project-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* 新项目创建卡片 */
.project-card.create-new {
    border: 2px dashed var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--gray-50);
}

.project-card.create-new:hover {
    border-color: var(--primary);
    background: var(--gray-100);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    width: min(90%, 520px);
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 1001;
    position: relative;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* 确保模态框内的输入元素可以获取焦点 */
.modal:focus {
    outline: none;
}

.modal-dialog * {
    user-select: auto;
    pointer-events: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: #e9ecef;
    color: #495057;
}

/* 表单样式 */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

/* 验证码显示 */
.verification-code {
    background: var(--gray-100);
    padding: var(--space-md);
    text-align: center;
    border-radius: var(--radius-sm);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

/* 警告样式 */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.alert-danger {
    background: #ffebee;
    border-left: 4px solid var(--danger);
    color: #c62828;
}

.text-danger {
    color: var(--danger);
}