/* 我的航班页面样式 */
.myflights-page-content {
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
    padding-bottom: 6rem;
}

.myflights-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.myflights-header {
    text-align: center;
    margin-bottom: 3rem;
}

.myflights-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: inline-block;
    animation: planeFloat 3s ease-in-out infinite;
}

@keyframes planeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.myflights-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.myflights-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 使用教程卡片 */
.myflights-tutorial-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="dark"] .myflights-tutorial-card {
    background: rgba(42, 42, 42, 0.7);
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(64, 64, 64, 0.5) inset;
}

.tutorial-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tutorial-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.tutorial-step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--text-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.tutorial-step-content {
    flex: 1;
}

.tutorial-step-content h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tutorial-step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.tutorial-step-content a {
    color: var(--text-primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.tutorial-step-content a:hover {
    color: var(--text-secondary);
}

/* 设置卡片 */
.myflights-settings-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="dark"] .myflights-settings-card {
    background: rgba(42, 42, 42, 0.7);
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(64, 64, 64, 0.5) inset;
}

.settings-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .form-input {
    background: rgba(42, 42, 42, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .form-input:focus {
    background: rgba(42, 42, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.save-btn {
    padding: 0.8rem 2rem;
    background: var(--text-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: flex-start;
    box-shadow: 0 2px 10px var(--shadow);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

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

/* 航班列表卡片 */
.myflights-list-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="dark"] .myflights-list-card {
    background: rgba(42, 42, 42, 0.7);
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(64, 64, 64, 0.5) inset;
}

.myflights-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-btn {
    padding: 0.8rem 1.5rem;
    background: var(--text-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

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

.myflights-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.flight-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.flight-card:nth-child(1) { animation-delay: 0.1s; }
.flight-card:nth-child(2) { animation-delay: 0.2s; }
.flight-card:nth-child(3) { animation-delay: 0.3s; }
.flight-card:nth-child(4) { animation-delay: 0.4s; }
.flight-card:nth-child(5) { animation-delay: 0.5s; }
.flight-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="dark"] .flight-card {
    background: rgba(42, 42, 42, 0.5);
}

.flight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px var(--shadow-hover);
    border-color: var(--text-secondary);
}

.flight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.flight-route {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.flight-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.flight-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex: 1;
}

.flight-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.flight-info-item i {
    width: 16px;
    color: var(--text-tertiary);
}

.flight-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.flight-action-btn {
    flex: 1;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

[data-theme="dark"] .flight-action-btn {
    background: rgba(255, 255, 255, 0.05);
}

.flight-action-btn:hover {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* 模态框样式 */
.flight-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.flight-modal.show {
    display: flex !important;
    animation: modalFadeIn 0.3s ease-out forwards;
}

.flight-modal.show .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.flight-modal.closing {
    animation: modalFadeOut 0.3s ease-out forwards;
}

.flight-modal.closing .modal-content {
    animation: modalSlideDown 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalSlideUp {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes modalSlideDown {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(50px) scale(0.9); opacity: 0; }
}

/* 阻止背景滚动 */
body.modal-open {
    overflow: hidden;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    transform-origin: center;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

[data-theme="dark"] .modal-content {
    background: rgba(42, 42, 42, 0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    /* 美化滚动条 */
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-tab {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.modal-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.ofp-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}

[data-theme="dark"] .ofp-content {
    background: rgba(255, 255, 255, 0.02);
}

.ofp-formatted {
    line-height: 1.8;
}

.ofp-section {
    margin-bottom: 1.5rem;
}

.ofp-section-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ofp-row {
    display: flex;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}

.ofp-label {
    min-width: 150px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ofp-value {
    flex: 1;
    color: var(--text-primary);
}

/* 可视化OFP样式 */
.ofp-visual {
    padding: 0;
}

.ofp-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ofp-section:last-child {
    border-bottom: none;
}

.ofp-section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ofp-navdata-version {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: normal;
    margin-left: auto;
    padding-left: 1rem;
}

.ofp-section-title i {
    color: var(--text-secondary);
}

.ofp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.ofp-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .ofp-card {
    background: rgba(255, 255, 255, 0.02);
}

.ofp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
    border-color: var(--text-secondary);
}

.ofp-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.ofp-card-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ofp-card-desc {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-align: left;
    margin-top: 0.5rem;
}

.ofp-two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.ofp-airport-info {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

[data-theme="dark"] .ofp-airport-info {
    background: rgba(255, 255, 255, 0.02);
}

.ofp-subtitle {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ofp-info-row {
    display: flex;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.ofp-info-label {
    min-width: 120px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
    padding-right: 1rem;
}

.ofp-info-value {
    flex: 1;
    color: var(--text-primary);
    text-align: left;
}

.ofp-info-unit {
    display: none;
}

.ofp-aircraft-reg {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: left;
}

.ofp-route-item {
    margin-bottom: 1rem;
}

.ofp-route-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.ofp-route-value {
    color: var(--text-primary);
    font-weight: 500;
}

.editable-aircraft-info {
    cursor: text;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px dashed transparent;
}

.editable-aircraft-info:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-color);
}

[data-theme="dark"] .editable-aircraft-info:hover {
    background: rgba(255, 255, 255, 0.05);
}

.editable-aircraft-info:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--text-primary);
}

[data-theme="dark"] .editable-aircraft-info:focus {
    background: rgba(255, 255, 255, 0.05);
}

.flight-number {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* 删除确认弹窗 */
.delete-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.delete-confirm-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

[data-theme="dark"] .delete-confirm-content {
    background: rgba(42, 42, 42, 0.95);
}

.delete-confirm-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.delete-confirm-header i {
    font-size: 2rem;
    color: #f44336;
}

.delete-confirm-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.delete-confirm-body {
    padding: 2rem;
}

.delete-confirm-body p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.delete-confirm-body strong {
    color: var(--text-primary);
    font-weight: bold;
}

.delete-confirm-warning {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.delete-confirm-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.delete-confirm-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-confirm-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .delete-confirm-cancel {
    background: rgba(255, 255, 255, 0.1);
}

.delete-confirm-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .delete-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.delete-confirm-delete {
    background: #f44336;
    color: white;
}

.delete-confirm-delete:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.ofp-route {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
}

[data-theme="dark"] .ofp-route {
    background: rgba(255, 255, 255, 0.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .flights-page-content {
        padding: 2rem 1rem;
    }

    .myflights-list {
        grid-template-columns: 1fr;
    }

    .myflights-list-header {
        flex-direction: column;
        align-items: stretch;
    }

    .import-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .ofp-two-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ofp-grid {
        grid-template-columns: 1fr;
    }
}

