/* 全局样式 */
:root {
    --primary-color: #009688;
    --primary-light: #a29bfe;
    --secondary-color: #5FB878;
    --success-color: #5FB878;
    --danger-color: #FF5722;
    --warning-color: #FFB800;
    --info-color: #1E9FFF;
    --light-color: #f8f9fa;
    --dark-color: #2F4056;
    --gray-color: #eee;
    --border-radius: 12px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --border-radius-sm: 0.5rem;
    --transition-speed: 0.3s;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --body-bg: #f1f5f9;
}

/* 现代 CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    font-family: var(--font-family);
    color: #333;
    background-color: #f2f2f2;
    overflow-x: hidden;
    margin: 0;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 页面布局 */
.page-container {
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* 自定义头部样式 */
.header {
    height: 60px;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .layui-logo {
    width: auto;
    height: 60px;
    line-height: 60px;
    color: var(--primary-color);
    font-size: 18px;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.header .layui-logo i {
    font-size: 20px;
    margin-right: 8px;
}

.header .layui-nav {
    background: none;
}

.header .layui-nav .layui-nav-item a {
    color: #333;
    font-size: 14px;
}

.header .layui-nav .layui-nav-item.layui-this a {
    color: var(--primary-color);
}

.header .layui-nav .layui-nav-item a:hover {
    color: var(--primary-color);
}

.header .layui-nav .layui-nav-bar {
    background-color: var(--primary-color);
}

/* 主内容区样式 */
.main-container {
    margin-top: 80px;
    margin-bottom: 20px;
    min-height: calc(100vh - 160px);
}

/* 页脚样式 */
.footer {
    height: 60px;
    line-height: 60px;
    background-color: #f2f2f2;
    color: #666;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-top: 1px solid #e6e6e6;
}

/* 页面标题区域 */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.page-header-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.page-header-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.page-header-icon i {
    font-size: 20px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.page-subtitle {
    color: #999;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.page-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* 统计卡片样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 2px 8px 0 rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 24px;
}

.stat-icon.color1 {
    background-color: var(--primary-color);
}

.stat-icon.color2 {
    background-color: var(--info-color);
}

.stat-icon.color3 {
    background-color: var(--success-color);
}

.stat-icon.color4 {
    background-color: var(--warning-color);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* 搜索框样式 */
.search-box {
    margin-bottom: 20px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    margin-bottom: 20px;
}

.empty-icon {
    width: 60px;
    height: 60px;
    background-color: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #999;
    font-size: 24px;
}

/* URL列表样式 */
.url-list .layui-card {
    margin-bottom: 0;
}

.url-item {
    border-bottom: 1px solid #f2f2f2;
    padding: 15px;
    transition: all 0.3s;
}

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

.url-item:hover {
    background-color: #f9f9f9;
}

.url-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.url-title i {
    margin-right: 8px;
    color: var(--primary-color);
}

.url-actions {
    margin-top: 10px;
    text-align: right;
}

.url-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.url-meta-item {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
}

.url-meta-item i {
    margin-right: 5px;
    color: #999;
}

/* 短链接列表样式 */
.short-link-item {
    border-bottom: 1px solid #f2f2f2;
    padding: 15px;
    transition: all 0.3s;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.short-link-item:last-child {
    border-bottom: none;
}

.short-link-item:hover {
    background-color: #f9f9f9;
}

.short-link-code {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.short-link-code i {
    color: var(--primary-color);
}

.short-code {
    font-weight: 600;
    color: var(--primary-color);
}

.short-link-full {
    color: #999;
    font-size: 13px;
    flex-basis: 100%;
    margin: 5px 0;
}

.short-link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 13px;
    flex: 2;
}

.short-link-meta-item {
    display: flex;
    align-items: center;
}

.short-link-meta-item i {
    margin-right: 5px;
    color: #999;
}

.short-link-actions {
    display: flex;
    gap: 5px;
}

/* 工具类 */
.mb-15 {
    margin-bottom: 15px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .short-link-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .short-link-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
}

@media screen and (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .page-actions {
        flex-direction: column;
    }
}

/* 通用工具类 */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.mt-15 {
    margin-top: 15px !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mb-15 {
    margin-bottom: 15px !important;
}

/* 页面布局 */
.page-container {
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar-brand i {
    font-size: 20px;
    margin-right: 8px;
}

.navbar-toggler {
    border: none;
    padding: 6px;
    color: var(--primary-color);
    background-color: transparent;
}

.navbar-nav {
    margin-top: 8px;
}

.nav-link {
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-right: 6px;
    font-size: 16px;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
}

/* 页脚 */
footer {
    background-color: white;
    padding: 10px 0;
    font-size: 12px;
    color: #777;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 900;
}

/* 表单与按钮 */
.form-control, .form-select {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
    font-size: 1rem;
    background-color: var(--light-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: #cbd5e1;
}

.input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: white;
    border-color: rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
    text-transform: capitalize;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: none;
    padding: 0.5rem 1rem;
}

.btn-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
    background-color: transparent;
    box-shadow: none;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
}

/* 卡片样式 */
.card {
    border-radius: var(--border-radius);
    border: none;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow);
    height: 100%;
}

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

.card-header {
    background-color: transparent;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 1.25rem;
}

/* 页面标题区 */
.page-title-container {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-title-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--dark-color);
}

.page-subtitle {
    font-size: 13px;
    color: #777;
    margin: 4px 0 0 0;
}

/* 统计卡片 */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stats-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stats-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: #f0f0f0;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
}

.stats-card-icon.active {
    background-color: rgba(0, 184, 148, 0.2);
    color: var(--success-color);
}

.stats-card-icon.expired {
    background-color: rgba(253, 203, 110, 0.2);
    color: var(--warning-color);
}

.stats-card-icon.clicks {
    background-color: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
}

.stats-card-content {
    flex: 1;
}

.stats-card-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.stats-card-label {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/* 搜索和操作区域 */
.action-panel {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.search-input-container {
    position: relative;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
}

.search-input-container .form-control {
    padding-right: 2.5rem;
    height: calc(3rem + 2px);
    font-size: 1rem;
}

.clear-search {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    z-index: 5;
    opacity: 0.7;
    transition: all 0.2s;
}

.clear-search:hover {
    opacity: 1;
    color: var(--danger-color);
}

/* 快速创建表单 */
.quick-create-form {
    max-width: 800px;
    margin: 0 auto;
}

.quick-create-input {
    width: 100%;
}

.quick-create-input .form-control {
    background-color: white;
}

/* 表格视图 */
.urls-compact-view {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table {
    margin-bottom: 0;
    white-space: nowrap;
}

.table th {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.table td {
    vertical-align: middle;
    font-size: 13px;
}

.url-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.url-info {
    overflow: hidden;
}

.url-compact-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
}

/* 视图切换 */
.view-toggle .btn-group {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.view-toggle .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 无结果提示 */
#no-results {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-top: 16px;
}

/* Toast通知 */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 90%;
    max-width: 320px;
}

.create-toast {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 12px 15px;
    margin-bottom: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.create-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.create-toast.success {
    border-left: 4px solid var(--success-color);
}

.create-toast.error {
    border-left: 4px solid var(--danger-color);
}

.create-toast i {
    margin-right: 10px;
    font-size: 18px;
}

.create-toast.success i {
    color: var(--success-color);
}

.create-toast.error i {
    color: var(--danger-color);
}

/* 创建短链接页面 */
.create-form-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.create-form-card .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.create-form-card .form-text {
    color: var(--gray-color);
}

/* 详情页 */
.detail-header {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.detail-title {
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.detail-title i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.original-url-box {
    background-color: var(--light-color);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    word-break: break-all;
    border: 1px solid rgba(0,0,0,0.05);
    font-size: 0.875rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 预览框样式 */
.preview-box {
    background-color: var(--light-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin-top: 0.5rem;
}

#base-url {
    color: var(--gray-color);
}

#preview-code {
    color: var(--primary-color);
    font-weight: 600;
}

/* 导航栏样式 - 移动端优化 */
.navbar {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar-brand i {
    font-size: 20px;
    margin-right: 8px;
}

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

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-btn i {
    font-size: 18px;
    margin-bottom: 3px;
}

.nav-btn.active {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
}

.nav-btn:hover {
    color: var(--primary-color);
}

/* 短链接列表样式 */
.short-links-list {
    display: flex;
    flex-direction: column;
}

.short-link-item {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.short-link-item:hover {
    background-color: rgba(108, 92, 231, 0.03);
}

.short-link-code {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.short-link-code i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 16px;
}

.short-link-code a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
}

.short-link-full {
    color: #777;
    font-size: 12px;
    margin-bottom: 10px;
    padding-left: 24px;
    word-break: break-all;
}

.short-link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.short-link-meta-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #777;
}

.short-link-meta-item i {
    margin-right: 6px;
    color: var(--primary-color);
}

.short-link-actions {
    display: flex;
    gap: 8px;
} 