/* Custom Styles for InfoSecPapers */

/* 整体配色方案 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #ecf0f1;
}

/* 页面整体布局 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 主容器 */
#main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 20px; /* 减少顶部空白 */
    position: relative;
}

/* H1标题样式优化 */
#headline {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    padding: 25px 30px !important;
    margin: 20px 0 30px 0 !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    border: none !important;
}

#headline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    pointer-events: none;
}

#headline h1 {
    display: block !important;
    font-size: 2.2em !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    z-index: 1 !important;
    color: white !important;
    text-align: center !important;
    letter-spacing: 1px !important;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

/* 隐藏h1标题中的DBLP折叠控制按钮 */
#headline ul.hide-control {
    display: none !important;
}

#headline .hide-control {
    display: none !important;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

/* 右上角更新信息 */
.update-info {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.15);
    backdrop-filter: blur(20px);
    z-index: 1000;
    max-width: 300px;
    font-size: 0.85em;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.update-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.2);
    border-color: rgba(52, 152, 219, 0.4);
}

.update-info .update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

.update-info .update-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1em;
}

.update-info .update-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-info .update-status {
    font-size: 0.75em;
    color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

.update-info .close-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.update-info .close-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
    transform: scale(1.1);
}

.update-info .update-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
    padding: 4px 0;
}

.update-info .conf-name {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9em;
    flex: 1;
    margin-right: 8px;
}

.update-info .deadline-info {
    color: var(--warning-color);
    font-weight: bold;
    font-size: 0.8em;
    background: rgba(243, 156, 18, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
}

.update-info .system-info {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    text-align: center;
    color: var(--text-secondary);
}

/* 卡片样式优化 */
.hideable {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hideable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* 标题样式 */
.hide-head {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 18px 25px;
    margin: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.hide-head::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    pointer-events: none;
}

.hide-head h2 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* 表格样式优化 */
.table {
    margin: 0;
    font-size: 0.95em;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--light-bg), #ecf0f1);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
    padding: 15px 12px;
    text-align: center;
    position: relative;
    text-align: center;
    font-size: 0.9em;
}

.table tbody td, .table tbody th {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #f1f3f4;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(236, 240, 241, 0.8);
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

.table tbody tr:nth-child(even):hover {
    background-color: rgba(52, 152, 219, 0.08);
}

/* Featured CFPs 特殊样式 */
.featured-row {
    background: linear-gradient(135deg, var(--accent-color), #c0392b) !important;
    color: white !important;
    font-weight: bold !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3) !important;
    border-left: 4px solid #fff !important;
}

.featured-row a {
    color: white !important;
    text-decoration: none !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.featured-row td {
    border-color: rgba(255, 255, 255, 0.3) !important;
    padding: 12px !important;
}

/* 链接样式 */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .update-info {
        position: relative;
        top: auto;
        right: auto;
        margin: 0 auto 25px auto;
        max-width: 100%;
        text-align: center;
        transform: none;
    }
    
    #main {
        padding-top: 15px;
    }
    
    #headline {
        margin: 15px 0 25px 0 !important;
        padding: 20px 25px !important;
    }
    
    #headline h1 {
        font-size: 1.8em !important;
    }
}

@media (max-width: 768px) {
    #main {
        padding: 15px;
        padding-top: 10px;
    }
    
    .update-info {
        font-size: 0.8em;
        padding: 12px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
    
    .update-info .update-title {
        font-size: 0.9em;
    }
    
    .update-info .update-status {
        font-size: 0.7em;
    }
    
    #headline {
        margin: 10px 0 20px 0 !important;
        padding: 18px 20px !important;
        border-radius: 12px !important;
    }
    
    #headline h1 {
        font-size: 1.5em !important;
        text-align: center !important;
    }
    
    .table-responsive {
        font-size: 0.85em;
    }
    
    .hide-head h2 {
        font-size: 1.2em;
    }
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-urgent {
    background-color: var(--accent-color);
    animation: pulse 2s infinite;
}

/* Inactive CFPs 状态样式 */
.status-active {
    color: var(--success-color);
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.status-upcoming {
    color: var(--warning-color);
    font-weight: 600;
    background: rgba(243, 156, 18, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.status-soon {
    color: var(--secondary-color);
    font-weight: 600;
    background: rgba(52, 152, 219, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.status-inactive {
    background-color: var(--text-secondary);
}

.status-past {
    background-color: #bdc3c7;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 倒计时样式 */
.countdown {
    font-weight: bold;
    color: var(--warning-color);
}

.countdown.urgent {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

/* 会议等级标识 */
.rank-a {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.rank-b {
    background: linear-gradient(45deg, #42a5f5, #66bb6a);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.rank-c {
    background: linear-gradient(45deg, #ab47bc, #8e24aa);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}