/* 申根签证行程单助手 - 优化样式文件 */

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #f8fafc;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --success-dark: #059669;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --text-color: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(30, 58, 138, 0.1);
    --gradient-start: #1e3a8a;
    --gradient-end: #1e40af;
    --hero-bg: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --light-bg: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.1), 0 2px 4px -1px rgba(30, 58, 138, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(30, 58, 138, 0.1), 0 10px 10px -5px rgba(30, 58, 138, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(30, 58, 138, 0.25);
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --shadow-sm: 0 1px 2px 0 rgba(30, 58, 138, 0.05);
}

/* 基础样式重置 */
*, ::after, ::before {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
}

:root {
    scroll-behavior: smooth;
}

/* 容器样式 */
.container-fluid {
    position: relative;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 95%;
}

/* Bootstrap基础布局 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* 强制双列布局 */
.row.mb-4 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
}

.row.mb-4 .col-md-6 {
    flex: 0 0 48% !important;
    max-width: 48% !important;
    width: 48% !important;
    margin-bottom: 1rem !important;
}

/* 基础工具类 */
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.h-100 { height: 100% !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.text-center { text-align: center !important; }
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }

/* ===== 卡片样式 - 确保完美边框对齐 ===== */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-bg);
    background-clip: border-box;
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

/* 卡片头部 - 确保顶部圆角和无边框 */
.card-header {
    position: relative;
    margin: 0;
    padding: 2rem;
    border: none;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* 确保绿色header的样式 */
.card-header.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%) !important;
}

.card-header h5 {
    position: relative;
    z-index: 1;
    color: white;
    margin: 0;
}

/* 卡片主体 - 确保与header完美对齐 */
.card-body {
    flex: 1 1 auto;
    margin: 0;
    padding: 2.5rem;
    border: none;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* ===== 功能卡片特殊样式 ===== */
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.feature-card .card-body {
    position: relative;
    z-index: 2;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    border: none;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.feature-card[data-feature="generate"]:hover {
    border-left: 6px solid var(--primary-color);
}

.feature-card[data-feature="review"]:hover {
    border-left: 6px solid var(--success-color);
}

/* ===== 导航栏样式 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-text {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    font-weight: 500;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    font-weight: 600;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.875rem 2rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.6);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.3);
}

/* ===== 表单样式 ===== */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== 图标和特效 ===== */
.feature-icon {
    margin-bottom: 1rem;
}

.feature-icon i {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon i {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== 警告和状态样式 ===== */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== 响应式设计 ===== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
    
    .row.mb-4 {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .row.mb-4 .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
    
    /* 功能卡片宽屏优化 */
    .feature-card {
        min-height: 320px;
        border-radius: 1.5rem;
    }
    
    .feature-card .card-body {
        padding: 3rem 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 0 0 1.5rem 1.5rem;
        margin: 0;
        border: none;
    }
    
    .feature-icon {
        margin-bottom: 2rem;
    }
    
    .feature-icon i {
        font-size: 4rem !important;
    }
    
    .card-title {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
        font-weight: 600;
    }
    
    .card-text {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
        text-align: center;
        max-width: 90%;
    }
    
    .btn-lg {
        padding: 1.25rem 3rem;
        font-size: 1.2rem;
        border-radius: 0.75rem;
        font-weight: 600;
        min-width: 180px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .row.mb-4 {
        margin-bottom: 3rem !important;
        margin-left: -1rem;
        margin-right: -1rem;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .row.mb-4 .col-md-6 {
        padding-left: 1rem;
        padding-right: 1rem;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .card-body {
        padding: 2rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    .card-body {
        padding: 1.5rem;
        border-radius: 0 0 0.75rem 0.75rem;
        margin: 0;
        border: none;
    }
    
    .card-header {
        border-radius: 0.75rem 0.75rem 0 0 !important;
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .feature-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .form-control {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }
}

/* 小屏幕适配 */
@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .card-header {
        padding: 1.25rem;
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0 !important;
    }
    
    .card-body {
        padding: 1.25rem;
        border-radius: 0 0 0.5rem 0.5rem;
        margin: 0;
        border: none;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .feature-icon i {
        font-size: 2rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 1.1rem;
        padding: 0.875rem;
        border-radius: 0.5rem;
        border: 2px solid #dee2e6;
        transition: all 0.3s ease;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
    
    .form-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .form-text {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .row .col-md-3,
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    input[type="file"] {
        padding: 0.75rem;
        border: 2px dashed #dee2e6;
        border-radius: 0.5rem;
        background-color: #f8f9fa;
    }
    
    input[type="file"]:focus {
        border-color: var(--primary-color);
        background-color: rgba(102, 126, 234, 0.05);
    }
    
    .card-title {
        font-size: 1.25rem;
        text-align: center;
    }
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}