/* 全局样式 */
:root {
    --primary-color: #fe2c55;
    --secondary-color: #161823;
    --text-color: #161823;
    --text-secondary: #8a8b91; 
    --background-color: #f8f8f8;
    --card-background: #ffffff;
    --border-color: #e6e6e6;
    --shadow-color: rgba(22, 24, 35, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 页面切换 */
.page {
    display: none;
    width: 100%;
}

.page.active {
    display: block;
}

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

/* 按钮样式 */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.4);
}

.primary-btn:hover {
    background-color: #e62548;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.5);
}

.secondary-btn {
    background-color: #f1f1f1;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.secondary-btn:hover {
    background-color: #e6e6e6;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
}

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

/* 输入框样式 */
.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* 登录页面 */

.login-container {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 40px;
    width: 90%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.login-form {
    width: 100%;
}

/* 主页面 */
#main-page {
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.logo-small {
    display: flex;
    align-items: center;
}

.logo-small img {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

.logo-small h2 {
    font-size: 18px;
    font-weight: 600;
}

.search-container {
    margin-bottom: 24px;
}

.search-container .input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.search-container input {
    padding: 14px 16px;
    font-size: 16px;
    flex: 1;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-container .primary-btn {
    padding: 12px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-radius: 4px;
    background-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.4);
}

.search-container .primary-btn:hover {
    background-color: #e62548;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.5);
}

.search-container .secondary-btn {
    padding: 12px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-radius: 4px;
    background-color: #f1f1f1;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.search-container .secondary-btn:hover {
    background-color: #e6e6e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 剩余查询次数 */
.query-limit {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 移除图标相关样式 */

#remaining-queries {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 2px;
}

/* 结果容器 */
#result-container {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 24px;
    margin-top: 24px;
}

#result-container.hidden {
    display: none;
}

/* 统计数据 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border-radius: 12px;
    background-color: #f9f9f9;
    transition: all 0.3s;
    box-shadow: 0 2px 6px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

/* 移除统计图标相关样式 */

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 历史记录入口 */
.history-entry {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

/* 视频信息 */
.video-info {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.video-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.video-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-left: 12px;
    border-left: 3px solid var(--primary-color);
}

.info-item {
    display: flex;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    width: 100px;
    flex-shrink: 0;
    position: relative;
    padding-left: 16px;
    display: flex;
    align-items: center;
}

.info-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.info-value {
    font-size: 14px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    display: flex;
    align-items: center;
}
.info-value img{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 6px;
}
/* 作品标题允许换行 */
.title-item .info-value {
    white-space: normal;
    word-break: break-word;
}

/* 历史记录页面 */
#history-page {
    background-color: var(--background-color);
}

#history-page header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

#history-page header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.history-list {
    padding: 16px;
}

.history-item {
    padding: 16px;
    border-radius: 8px;
    background-color: var(--card-background);
    box-shadow: 0 2px 8px var(--shadow-color);
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.history-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 20px;
}
.history-title img{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 6px;
}
.history-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.history-meta {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--text-secondary);
    gap: 10px;
}

.history-date {
    background-color: rgba(254, 44, 85, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-stat {
    margin-right: 10px;
    display: flex;
    align-items: center;
    background-color: rgba(254, 44, 85, 0.05);
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s;
}

.history-stat:hover {
    background-color: rgba(254, 44, 85, 0.1);
    transform: translateY(-2px);
}

.history-stat:last-child {
    margin-right: 0;
}

/* 移除历史记录图标相关样式 */

.empty-history {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
}

/* 搜索容器 */
.search-container {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
}

#search-input {
    flex: 7;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin: 0;
    margin-right: 10px;
}
