/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #1a73e8;
    --primary-light: #e3f2fd;
    --secondary: #0d47a1;
    --light: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #5f6368;
    --dark-gray: #3c4043;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --border: #dadce0;
    --shadow: rgba(0, 0, 0, 0.1);
    --container-width: 900px; /* 默认窄版宽度 */
    --layout-mode: 'narrow'; /* 默认布局模式 */
}

body {
    background: linear-gradient(135deg, #0c1a33, #1c3e6e);
    color: var(--dark-gray);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    background-image: url('https://images.unsplash.com/photo-1586769852836-bc069f19e1b6?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-blend-mode: overlay;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-bottom: 40px;
    transition: max-width 0.3s ease;
}

header {
    text-align: center;
    padding: 20px 0 10px;
    margin-bottom: 15px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    padding: 10px;
    box-shadow: 0 4px 10px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: auto;
    transform: scale(1.6);
    transform-origin: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--light);
}

.subtitle {
    color: #bbdefb;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* 公告栏样式 */
.announcement-bar {
    background: linear-gradient(90deg, #ff9800, #ff6d00);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 0 auto 20px;
    max-width: 600px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-icon {
    font-size: 1.2rem;
    color: white;
}

.announcement-content {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

.announcement-content marquee {
    font-weight: 500;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    background: var(--light);
    border-radius: 12px;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 600px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.nav-tab {
    flex: 1;
    text-align: center;
    padding: 14px 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray);
    position: relative;
    border-right: 1px solid var(--border);
    min-width: 120px;
}

.nav-tab:last-child {
    border-right: none;
}

.nav-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.3);
}

.nav-tab:hover:not(.active) {
    background: var(--light-gray);
}

.nav-tab i {
    margin-right: 8px;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.card-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.card-title i {
    font-size: 1.2rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1 1 calc(50% - 15px);
    min-width: 250px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.required {
    color: var(--danger);
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--dark-gray);
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: var(--light-gray);
    border-radius: 10px;
    padding: 14px;
    margin-top: 5px;
    border: 1px solid var(--border);
}

.time-display span {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--dark-gray);
    flex: 1;
}

.btn {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark-gray);
    border: 1px solid var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* 刷新按钮样式 */
#refresh-time {
    padding: 1px 15px;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-group .btn {
    flex: 1;
    padding: 14px 25px;
    border-radius: 50px;
    font-size: 1rem;
}

.log-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.log-item {
    background: var(--light);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.log-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.callsign {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.log-time {
    font-size: 0.9rem;
    color: var(--gray);
}

.log-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.detail-item strong {
    color: var(--gray);
    display: block;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    background: var(--light-gray);
    border-radius: 12px;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #bbdefb;
}

.contact-info {
    background: rgba(26, 115, 232, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid var(--primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 115, 232, 0.1);
    border-radius: 50%;
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.contact-text p {
    color: var(--gray);
    font-size: 0.95rem;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.qr-code-box {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.qr-code-box h4 {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.qr-code {
    width: 180px;
    height: 180px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    margin: 0 auto;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-code-box p {
    margin-top: 10px;
    color: var(--gray);
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    background: var(--success);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(200%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: var(--danger);
}

footer {
    text-align: center;
    padding: 30px 0 0;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-top: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: var(--container-width, 900px);
    margin: 0 auto;
    transition: max-width 0.3s ease;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo .logo-icon {
    width: 50px;
    height: 50px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--light);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-buttons .btn {
    flex: 1;
}

/* 使用说明样式 */
.usage-instructions {
    background: rgba(26, 115, 232, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--primary);
}

.usage-instructions h3 {
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(26, 115, 232, 0.3);
    padding-bottom: 10px;
}

.usage-instructions ul, .usage-instructions ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.usage-instructions li {
    margin-bottom: 10px;
    line-height: 1.6;
    position: relative;
    padding-left: 25px;
}

.usage-instructions li:before {
    content: "?";
    position: absolute;
    left: 10px;
    color: var(--primary);
    font-size: 1.2rem;
}

.data-validation {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--success);
}

.data-validation h3 {
    color: var(--success);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    padding-bottom: 10px;
}

.info-icon {
    color: var(--primary);
    margin-right: 8px;
}

.policy-content {
    padding: 15px;
    background: rgba(26, 115, 232, 0.05);
    border-radius: 10px;
    margin: 15px 0;
}

.policy-content h4 {
    color: var(--primary);
    margin: 15px 0 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.policy-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.policy-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.about-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.about-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.about-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* 移除系统特点前的点 */
.about-features {
    list-style-type: none;
    padding-left: 0;
}

.about-features li {
    padding-left: 0;
    margin-bottom: 10px;
}

.about-features li:before {
    content: none;
}

.terms-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.terms-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.terms-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.help-content {
    padding: 15px;
    background: rgba(26, 115, 232, 0.05);
    border-radius: 10px;
    margin: 15px 0;
}

.help-content h3 {
    color: var(--primary);
    margin: 15px 0 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
    font-size: 1.2rem;
}

.help-content h4 {
    color: var(--primary);
    margin: 15px 0 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
    font-size: 1.1rem;
}

.help-content h5 {
    color: var(--dark-gray);
    margin: 10px 0 5px;
    font-size: 1rem;
}

.help-content p {
    margin-bottom: 8px;
    color: var(--dark-gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.help-content li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--dark-gray);
}

.help-content .faq-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.help-content .contact-section {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.help-content .contact-section h5 {
    color: var(--success);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .nav-tab {
        padding: 12px 5px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .nav-tab i {
        display: block;
        margin: 0 auto 5px;
        font-size: 1.1rem;
    }
    
    .qr-code-container {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-logo {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content, .terms-content, .help-content {
        padding: 15px;
    }
}

/* 宽窄版切换样式 */
.layout-switch-container {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.layout-switch-label {
    font-size: 0.85rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.layout-switch {
    position: relative;
    width: 80px;
    height: 30px;
    background: var(--light-gray);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.layout-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 36px;
    height: 26px;
    background: var(--primary);
    border-radius: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 0;
}

.layout-switch.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.layout-switch.active::before {
    left: calc(100% - 39px);
    background: var(--primary);
}

.layout-switch-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
    pointer-events: none;
    z-index: 1;
}

.layout-switch-text.narrow {
    left: 12px;
}

.layout-switch-text.wide {
    right: 12px;
}

.layout-switch:not(.active) .layout-switch-text.narrow {
    color: white;
}

.layout-switch.active .layout-switch-text.wide {
    color: white;
}

/* 宽版样式 */
body.wide-layout {
    --container-width: 1440px;
    --layout-mode: 'wide';
}

body.wide-layout .container {
    max-width: var(--container-width);
}

body.wide-layout .card {
    padding: 30px;
}

body.wide-layout .form-group {
    flex: 1 1 calc(33.333% - 15px);
    min-width: 300px;
}

body.wide-layout .nav-tabs {
    max-width: 800px;
}

body.wide-layout .announcement-bar {
    max-width: 800px;
}

/* 窄版样式（默认） */
body.narrow-layout {
    --container-width: 900px;
    --layout-mode: 'narrow';
}

body.narrow-layout .container {
    max-width: var(--container-width);
}

/* 移动端隐藏切换按钮 */
@media (max-width: 768px) {
    .layout-switch-container {
        display: none;
    }
}