/* assets/style.css */
/* 统一样式，整合所有页面CSS */

/* 全局变量定义 */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 20px 25px -5px rgba(0,0,0,0.05);
}

/* 基础页面样式 */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--background);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
    color: var(--text);
    padding: 2rem;
}

a {
    margin: 5px;
}

    .mobile-header{
        margin: 0 auto;
    }
    
.container {
    width: 100%;
    max-width: 1400px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: stretch;
}

/* 登录页面样式 */
.login-card {
    max-width: 400px;
    margin: 5rem auto;
    text-align: center;
    padding: 2.5rem;
}

/* 头部样式 */
.header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    margin: 0 auto;
}

.title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto;
}

.title svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logout-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.alert {padding: 0.5rem 1.5rem;
    background: linear-gradient(45deg, var(--primary), #a363d9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* 表单样式 */
.form-group {
    margin: 10px 50px;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #4a4a4a;
}

.input-group {
    margin: 0 15px 20px 0;
}



input[type="text"],
input[type="url"],
input[type="password"] {
    width: 100%;
    padding: 1rem 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    outline: none;
}

input[type="file"] {
    width: 100%;
    padding: 1.5rem; /* 合并重复定义，使用最大的padding值 */
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--background);
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input[type="file"]:hover {
    border-color: var(--primary);
    background: #f5f3ff;
    transform: translateY(-2px);
}

.input-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    text-align: center;
}

input[name="app_icon_url"] {
    background: #f8f9fa url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="%236c5ce7" xmlns="http://www.w3.org/2000/svg"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h4v4h2v-4c0-1.1-.9-2-2-2z"/></svg>') no-repeat 98% 50%/20px;
}

button[type="submit"] {
    width: 100%;
    padding: 1.2rem 0;
    background: linear-gradient(45deg, var(--primary), #a363d9);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
}

button[type="submit"]:hover {
    background: linear-gradient(45deg, #5b4dc0, #8d52c7);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    transform: translateY(-2px);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
}

thead {
    background: var(--background);
    border-bottom: 2px solid var(--border);
}

th, td {
    padding: 1.25rem;
    border: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-align: left;
}

td {
    font-size: 0.875rem;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f1f5f9;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 500;
    color: var(--text);
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.file-size {
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
    border: 1px solid transparent;
    justify-content: center;
    align-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
}

.btn-secondary{
    width: 50%;
    margin: 0 20px;
}

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

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

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

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

/* 空状态样式 */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    margin: 2rem;
    border-radius: var(--radius);
}

@media (min-width: 601px) {
    .header-content {
        flex-direction: row;
    }
    .header-buttons {
        flex-direction: row;
    }
}
/* 移动端优化样式 */
@media (max-width: 600px) {
    /* 优化基础布局 */
    body {
        padding: 0.5rem !important;
        min-width: 320px;
    }

    /* 容器调整为全宽无圆角 */
    .container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin: 0;
    }
    
    .auth-links{
        padding: 0;
    }
    /* 主标题优化 */
    h1 {
        font-size: 1.75rem;
        text-align: center;
        padding: 0 1rem;
    }

    /* 登录状态提示优化 */
    .form-group p {
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* 表单组优化 */
    .form-group,.input-group {
        padding: 0.5rem;
        margin: 0 20px 0 20px;
    }

    /* 输入框优化 */
    input[type="text"],
    input[type="url"],
    input[type="password"],
    input[type="file"] {
        font-size: 1rem;
        border-width: 1px;
    }



    /* 文件上传提示优化 */
    .input-hint {
        font-size: 0.85rem;
        margin: 0.25rem 0;
    }


    /* 双按钮布局优化 */
    .btn-primary + .btn-danger {
        margin-top: 0.5rem;
    }
}

.header{
    padding: 0;
}
.header-content {

    }
    .header-buttons {

    }
    .logout-btn {
        justify-content: center;
    }

/* 超小屏幕优化 (例如折叠手机) */
@media (max-width: 360px) {
    h1 {
        font-size: 1.5rem !important;
    }
    
    .form-group label {
        font-size: 1rem !important;
    }
    
    input[type="file"] {
        padding: 0.75rem !important;
    }
}

/* 横屏优化 */
@media (max-width: 800px) and (orientation: landscape) {
    .container {
        padding: 0.5rem !important;
    }
    
    form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .form-group {
        margin: 0 !important;
        padding: 0.25rem !important;
    }
}