/* ===== Base Reset & Variables ===== */
:root {
    --primary-bg: #0a1628;
    --secondary-bg: #132238;
    --card-bg: #1a3050;
    --accent-blue: #00d4ff;
    --accent-orange: #ff9500;
    --accent-red: #ff4757;
    --accent-green: #2ed573;
    --text-primary: #ffffff;
    --text-secondary: #8b9eb5;
    --border-color: #2a4060;
    --shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* ===== Container ===== */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
}

/* ===== Header - Flight Board Style ===== */
.header {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, #1e3a5f 100%);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-blue);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 24px;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.update-time {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: var(--accent-blue);
    font-weight: bold;
}

/* ===== Flight Board ===== */
.flight-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
}

.flight-header {
    background: linear-gradient(90deg, var(--accent-blue) 0%, #0099cc 100%);
    padding: 8px 16px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.flight-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    letter-spacing: 2px;
}

.flight-icon {
    font-size: 16px;
}

.flight-info {
    font-size: 12px;
    color: #000;
    font-weight: 600;
}

/* ===== Notices Container ===== */
.notices-container {
    flex: 1;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.notices-wrapper {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    height: 100%;
}

.notices-wrapper.active {
    display: flex;
}

/* ===== Notice Card - New Compact Style ===== */
.notice-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(26, 48, 80, 0.9) 100%);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.notice-card:hover {
    transform: translateX(4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.notice-card.urgent {
    border-left: 4px solid var(--accent-red);
}

.notice-card.expiring {
    border-left: 4px solid var(--accent-orange);
}

/* Main container: horizontal layout */
.notice-main {
    display: flex;
    min-height: 100%;
}

/* Channel icon on the left */
.notice-channel-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 10px;
    min-width: 65px;
    gap: 6px;
}

.notice-channel-icon .channel-emoji {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.notice-card:hover .channel-emoji {
    transform: scale(1.1);
}

.channel-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.85;
    text-align: center;
}

/* Channel-specific colors */
.notice-channel-icon[data-channel="oa"],
.notice-channel-icon[data-channel="oa群"] {
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 100%);
}
.notice-channel-icon[data-channel="oa"] .channel-emoji,
.notice-channel-icon[data-channel="oa群"] .channel-emoji {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #000;
}

.notice-channel-icon[data-channel="微信"],
.notice-channel-icon[data-channel="微信群"] {
    background: linear-gradient(135deg, #0a1f12 0%, #1a3a20 100%);
}
.notice-channel-icon[data-channel="微信"] .channel-emoji,
.notice-channel-icon[data-channel="微信群"] .channel-emoji {
    background: linear-gradient(135deg, #4fcb60, #2ed573);
    color: #000;
}

.notice-channel-icon[data-channel="邮件"],
.notice-channel-icon[data-channel="email"] {
    background: linear-gradient(135deg, #1f1a0a 0%, #3a3010 100%);
}
.notice-channel-icon[data-channel="邮件"] .channel-emoji,
.notice-channel-icon[data-channel="email"] .channel-emoji {
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    color: #000;
}

.notice-channel-icon[data-channel="点对点"] {
    background: linear-gradient(135deg, #150a1f 0%, #2a1a3a 100%);
}
.notice-channel-icon[data-channel="点对点"] .channel-emoji {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
}

.notice-channel-icon[data-channel="短信"] {
    background: linear-gradient(135deg, #1f1a0a 0%, #3a3010 100%);
}
.notice-channel-icon[data-channel="短信"] .channel-emoji {
    background: linear-gradient(135deg, #ffd93d, #f39c12);
    color: #000;
}

.notice-channel-icon[data-channel="default"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
}
.notice-channel-icon[data-channel="default"] .channel-emoji {
    background: linear-gradient(135deg, #8b9eb5, #6b7e95);
    color: #fff;
}

/* Notice body on the right */
.notice-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== Distinct Notice Colors (left border) ===== */
.notice-card.color-0 { border-left: 4px solid #00d4ff; }
.notice-card.color-1 { border-left: 4px solid #4fcb60; }
.notice-card.color-2 { border-left: 4px solid #ff9500; }
.notice-card.color-3 { border-left: 4px solid #9b59b6; }
.notice-card.color-4 { border-left: 4px solid #ff6b6b; }
.notice-card.color-5 { border-left: 4px solid #ffd93d; }
.notice-card.color-6 { border-left: 4px solid #6bcb77; }
.notice-card.color-7 { border-left: 4px solid #a29bfe; }

.notice-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.notice-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.notice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.notice-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.notice-channel[data-channel="oa"] {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-blue);
}

.notice-channel[data-channel="微信"] {
    background: rgba(79, 203, 96, 0.2);
    color: #4fcb60;
}

.notice-channel[data-channel="邮件"] {
    background: rgba(255, 149, 0, 0.2);
    color: var(--accent-orange);
}

.notice-channel[data-channel="点对点"] {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.notice-channel[data-channel="短信"] {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.notice-channel[data-channel="default"] {
    background: rgba(139, 158, 181, 0.2);
    color: var(--text-secondary);
}

.notice-expire {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(139, 158, 181, 0.15);
    flex-shrink: 0;
}

.notice-expire.urgent {
    color: #fff;
    font-weight: bold;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    animation: pulse-urgent 1.5s infinite;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

.notice-expire.expiring {
    color: #000;
    font-weight: bold;
    background: linear-gradient(135deg, #ff9500, #ffa502);
    animation: pulse-warning 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
}

@keyframes pulse-urgent {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(255, 71, 87, 0);
    }
}

@keyframes pulse-warning {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(255, 149, 0, 0);
    }
}

.notice-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.notice-title::before {
    content: '【';
    color: var(--accent-blue);
}

.notice-title::after {
    content: '】';
    color: var(--accent-blue);
}

.notice-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}



/* ===== Loading State ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 16px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
}

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

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Flight Footer ===== */
.flight-footer {
    background: var(--card-bg);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 6px 6px;
    margin-top: 2px;
}

.page-indicator {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-blue);
    font-weight: bold;
}

.refresh-info {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== Status Bar ===== */
.status-bar {
    background: var(--secondary-bg);
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    border-top: 1px solid var(--border-color);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
}

.status-dot.active {
    background: var(--accent-green);
    animation: pulse 2s infinite;
}

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

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

/* ===== Animations ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice-card {
    animation: slideIn 0.5s ease forwards;
}

/* ===== Responsive ===== */
@media (max-height: 600px) {
    .header {
        padding: 10px 16px;
    }
    .header h1 {
        font-size: 18px;
    }
    .flight-board {
        padding: 12px;
    }
    .notice-card {
        padding: 12px 16px;
    }
    .notice-title {
        font-size: 16px;
    }
    .notice-content {
        font-size: 13px;
    }
}

@media (min-height: 800px) {
    .notice-card {
        padding: 20px 24px;
    }
    .notice-title {
        font-size: 20px;
    }
}
