/* 现代简约风格 - Modern Simple Style */

:root {
    /* 主色调 - 清新蓝色 */
    --primary-blue: #3B82F6;
    --primary-blue-light: #60A5FA;
    --primary-blue-dark: #2563EB;
    --primary-blue-hover: #1D4ED8;

    /* 中性色 */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border-color: #E5E7EB;
    --background: #F9FAFB;
    --background-white: #FFFFFF;

    /* 功能色 */
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --error-red: #EF4444;

    /* 设计参数 */
    --border-radius: 8px;
    --border-radius-large: 12px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --box-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --box-shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 64px;
}

/* 导航栏样式 */
.navbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-user {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-logout:hover {
    color: var(--error-red);
    border-color: var(--error-red);
    background: rgba(239, 68, 68, 0.05);
}

/* 主容器 */
.container-modern {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 页面头部 */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.decorative-line {
    width: 48px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
    margin: 1rem 0;
}

.page-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* 卡片样式 */
.card-modern {
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.card-modern:hover {
    box-shadow: var(--box-shadow-medium);
}

.card-header-modern {
    background: var(--background-white);
    border-bottom: 3px solid var(--primary-blue);
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header-modern small {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.card-body-modern {
    padding: 1.5rem;
}

/* 表单样式 */
.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control-modern {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control-modern::placeholder {
    color: var(--text-tertiary);
}

textarea.form-control-modern {
    resize: vertical;
    min-height: 120px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

/* 输入组 */
.input-group-modern {
    display: flex;
    gap: 0.75rem;
}

.input-group-modern .form-control-modern {
    flex: 1;
}

.input-group-modern .btn-modern {
    flex-shrink: 0;
}

/* 按钮样式 */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-height: 38px;
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-modern-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-modern-primary:hover:not(:disabled) {
    background: var(--primary-blue-hover);
}

.btn-modern-primary:active:not(:disabled) {
    background: var(--primary-blue-dark);
}

.btn-modern-secondary {
    background: var(--success-green);
    color: white;
}

.btn-modern-secondary:hover:not(:disabled) {
    background: #059669;
}

.btn-modern-secondary:active:not(:disabled) {
    background: #047857;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* 搜索结果 */
.search-results {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 0.75rem;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: var(--box-shadow-medium);
}

.search-results-header {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.search-result-username {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.search-result-realname {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-result-add {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--success-green);
    font-weight: 500;
}

/* 结果容器 */
.results-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

.results-list {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.result-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--background-white);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-blue);
    transition: var(--transition);
}

.result-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

.result-item:last-child {
    margin-bottom: 0;
}

/* 自定义滚动条 */
.results-container::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 6px;
}

.results-container::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: var(--primary-blue-light);
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* 警告框 */
.alert-modern {
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-modern-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue-dark);
    border-left-color: var(--primary-blue);
}

.alert-modern-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border-left-color: var(--error-red);
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* 工具类 */
.d-none {
    display: none !important;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.login-card {
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--box-shadow-large);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

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

.login-form .btn-modern {
    width: 100%;
    padding: 0.75rem;
}

/* 使用说明区域 */
.luxury-text {
    color: var(--text-primary);
}

.luxury-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.luxury-text ul {
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-secondary);
    padding-left: 1.25rem;
}

.luxury-text li {
    margin-bottom: 0.375rem;
}

/* 动画效果 */
.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }

    .navbar-modern {
        height: 56px;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-actions {
        gap: 0.75rem;
    }

    .navbar-user {
        display: none;
    }

    .btn-logout {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .container-modern {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .card-header-modern {
        padding: 1rem;
        font-size: 1rem;
    }

    .card-body-modern {
        padding: 1rem;
    }

    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    /* 使用说明改为单列 */
    .card-body-modern > div[style*="grid-template-columns"] {
        display: block !important;
    }

    .card-body-modern > div[style*="grid-template-columns"] > div {
        margin-bottom: 1.5rem;
    }

    .card-body-modern > div[style*="grid-template-columns"] > div:last-child {
        margin-bottom: 0;
    }
}
