/*
 * Group Ride Simulator - Frosted Glass UI Style v1.8
 */

/* 变量定义 */
:root {
    --card-bg: rgba(255, 255, 255, 0.2);
    --card-border-color: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    --input-bg: rgba(255, 255, 255, 0.5);
    --input-border: rgba(200, 200, 200, 0.4);
    --input-focus-border-color: #00AFFF;
    --input-invalid-border-color: #e53e3e; /* 红色用于错误提示 */

    --primary-btn-bg: linear-gradient(90deg, #00AFFF 0%, #A777E8 100%);
    --secondary-btn-bg: linear-gradient(90deg, #6c757d 0%, #5a6268 100%);
    --danger-btn-bg: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);

    --text-color: #1a202c;
    --text-color-light: #333;
    --text-color-on-glass: #2d3748;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}

.grs-container {
    padding-top: 50px;
    position: relative;
    z-index: 1;
}

/* 毛玻璃卡片效果 */
.card { 
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem; 
    transition: all 0.3s ease;
}
.card:hover {
    box-shadow: 0 10px 40px 0 rgba(31, 38, 135, 0.2);
    transform: translateY(-2px);
}

/* 调整卡片内文字颜色以保证可读性 */
/* **改进 #1: 移除了 !important** */
.card, .card h2, .card label, .card p {
    color: var(--text-color-on-glass);
}
.card .text-xs {
    color: #4a5568;
}

/* 静态信息框样式 */
.info-box {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
    margin: 1rem 0;
}
.info-box p,
.info-box p strong {
     color: #334155;
     font-size: 0.75rem; /* 调小字体 */
     line-height: 1.4;   /* 让行距舒服一点 */
}

/* 输入框样式 */
.input-group label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
}
.input-field, .select-field { 
    width: 100%; 
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.75rem 1rem; 
    color: var(--text-color);
    transition: all 0.3s ease;
}
.input-field:focus, .select-field:focus {
    outline: none;
    border-color: var(--input-focus-border-color);
    box-shadow: 0 0 0 3px rgba(0, 175, 255, 0.25);
    background-color: rgba(255, 255, 255, 0.9);
}
.input-field:disabled { 
    background-color: rgba(0, 0, 0, 0.1);
    cursor: not-allowed; 
    opacity: 0.6; 
}

/* **改进 #2: 增加输入验证样式** */
.input-field.is-invalid {
    border-color: var(--input-invalid-border-color);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.25);
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-danger {
    color: white; 
    font-weight: 600; 
    /* **改进 #1: 移除了 !important** */
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: none; 
    cursor: pointer; 
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15);
    filter: saturate(1.1) brightness(1.05);
}
.btn-primary { 
    background: var(--primary-btn-bg);
    width: 100%;
}
.btn-secondary { 
    background: var(--secondary-btn-bg);
}
.btn-danger {
    background: var(--danger-btn-bg);
}
.btn-primary:disabled { 
    background: #adb5bd;
    filter: none;
    box-shadow: none;
    cursor: not-allowed;
    transform: translateY(0);
}

/* 仅跟随复选框样式 */
.form-checkbox.follow-only-checkbox {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0;
    display: inline-block;
    position: relative;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
}
.form-checkbox.follow-only-checkbox:checked {
    background-image: var(--primary-btn-bg);
    border-color: transparent;
}
.form-checkbox.follow-only-checkbox:checked::after {
    content: '✔';
    position: absolute;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 表格样式 */
.summary-table { 
    width: 100%; 
    margin-top: 1.5rem; 
    border-collapse: collapse; 
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    overflow: hidden;
}
.summary-table th, .summary-table td { 
    padding: 0.75rem 1rem; 
    text-align: center; 
    border: 1px solid var(--card-border-color);
}
.summary-table th { 
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600; 
}
.status-dropped { 
    color: #c53030;
    font-weight: bold; 
}
.status-active { 
    color: #2f855a;
}

/* 进度条 */
.progress-bar-container { 
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden; 
    height: 10px; 
    width: 100%; 
    margin: 0 auto; 
    border: 1px solid var(--input-border);
}
.progress-bar { 
    background: var(--primary-btn-bg);
    height: 100%; 
    transition: width 0.5s ease-in-out; 
    border-radius: 10px;
}

/* 建议卡片 */
.recommendation-card { 
    background: rgba(0, 175, 255, 0.2);
    border: 1px solid rgba(0, 175, 255, 0.4);
    padding: 1rem; 
    border-radius: 15px;
    text-align: center; 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.recommendation-card h3 {
    color: #005a8d;
}
.recommendation-card .text-green-400 {
    color: #2f855a;
}
.recommendation-card .text-red-300 {
    color: #c53030;
}

/* 对比高亮 */
.comparison-b { 
    border-left: 3px solid #A777E8; 
}


