/* =============================================
   礼物推荐 - gift_recommendation.css
   主题色：玫瑰粉 #ec4899 / #db2777
   三栏布局：历史 | 表单 | 结果
   ============================================= */

/* ========== 主容器 ========== */
.gr-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fdf2f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.1);
    transition: all 0.3s ease;
}

.gr-container.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.gr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    min-height: 40px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.40);
    flex-shrink: 0;
}

.gr-toolbar .toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.gr-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.8px;
    margin-right: 4px;
}

.gr-toolbar .toolbar-btn {
    padding: 4px 11px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #9d174d;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}

.gr-toolbar .toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.gr-toolbar .toolbar-btn:active:not(:disabled) { transform: translateY(0); }

.gr-toolbar .toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gr-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, #fff1f5 0%, #fce7f3 100%);
    color: #9d174d;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.4);
}

.gr-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.6);
}

/* 推荐中 shimmer 动画 */
.gr-toolbar .toolbar-btn-primary.gr-btn-loading {
    background: linear-gradient(90deg, #fce7f3 0%, #fdf2f8 35%, #fce7f3 65%, #fbcfe8 100%);
    background-size: 200% 100%;
    animation: grBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

body.dark .gr-toolbar .toolbar-btn-primary.gr-btn-loading {
    background: linear-gradient(90deg, #831843 0%, #be185d 35%, #831843 65%, #9d174d 100%);
    background-size: 200% 100%;
    animation: grBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
}

@keyframes grBtnShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 三栏主内容 ========== */
.gr-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fdf2f8;
}

/* ========== 左栏：历史记录 ========== */
.gr-history-panel {
    width: 185px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fbcfe8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gr-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #fff1f5 0%, #fdf2f8 100%);
    border-bottom: 1px solid #fbcfe8;
    flex-shrink: 0;
}

.gr-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #831843;
}

.gr-history-count {
    font-size: 11px;
    color: #be185d;
    font-weight: 400;
}

.gr-history-clear-btn {
    background: #fff1f5;
    border: none;
    color: #be185d;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}
.gr-history-clear-btn:hover { background: #fbcfe8; }

.gr-history-search {
    padding: 7px;
    border-bottom: 1px solid #fbcfe8;
    flex-shrink: 0;
}

.gr-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #f9a8d4;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #831843;
    background: #fff1f5;
}

.gr-history-search input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.18);
}

.gr-history-search input::placeholder { color: #f9a8d4; }

.gr-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.gr-history-empty {
    text-align: center;
    color: #be185d;
    font-size: 12px;
    padding: 24px 8px;
    line-height: 1.8;
    opacity: 0.7;
}

.gr-history-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #fff1f5;
    border: 1px solid #fbcfe8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    gap: 6px;
}

.gr-history-item:hover {
    background: #fce7f3;
    border-color: #ec4899;
    transform: translateX(2px);
}

.gr-history-item.active {
    background: #fce7f3;
    border-color: #ec4899;
    box-shadow: inset 3px 0 0 #ec4899, 0 1px 4px rgba(236, 72, 153, 0.25);
}

.gr-history-item-icon { font-size: 14px; flex-shrink: 0; }

.gr-history-item-main { flex: 1; min-width: 0; }

.gr-history-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #831843;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gr-history-item-meta {
    font-size: 11px;
    color: #be185d;
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 2px;
}

.gr-history-item-type {
    background: #fbcfe8;
    color: #9d174d;
    border-radius: 3px;
    padding: 0 4px;
    font-size: 10px;
}

.gr-history-item-del {
    width: 18px; height: 18px;
    background: #fff0ee;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.gr-history-item:hover .gr-history-item-del { opacity: 1; }
.gr-history-item-del:hover { background: #ef4444; color: white; }

.gr-history-list::-webkit-scrollbar { width: 4px; }
.gr-history-list::-webkit-scrollbar-track { background: transparent; }
.gr-history-list::-webkit-scrollbar-thumb { background: #f9a8d4; border-radius: 2px; }
.gr-history-list::-webkit-scrollbar-thumb:hover { background: #ec4899; }

/* ========== 中栏：表单区域 ========== */
.gr-form-panel {
    width: 270px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fbcfe8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gr-panel-header {
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fff1f5 0%, #fdf2f8 100%);
    border-bottom: 1px solid #fbcfe8;
    flex-shrink: 0;
}

.gr-panel-header h3 {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 600;
    color: #831843;
}

.gr-panel-tip { font-size: 11px; color: #be185d; }

.gr-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.gr-form-body::-webkit-scrollbar { width: 4px; }
.gr-form-body::-webkit-scrollbar-track { background: transparent; }
.gr-form-body::-webkit-scrollbar-thumb { background: #f9a8d4; border-radius: 2px; }
.gr-form-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

.gr-form-group { margin-bottom: 14px; }

.gr-form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #831843;
    margin-bottom: 6px;
}

.gr-required {
    color: #ec4899;
    font-weight: 700;
}

.gr-optional-tag {
    font-weight: 400;
    font-size: 10px;
    background: #fbcfe8;
    color: #9d174d;
    padding: 0 5px;
    border-radius: 4px;
}

.gr-shortcut-hint {
    font-weight: 400;
    font-size: 10px;
    color: #be185d;
    opacity: 0.7;
    margin-left: 2px;
}

.gr-form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #fbcfe8;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #831843;
    background: #fff1f5;
}

.gr-form-input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.15);
    background: #fff;
}

.gr-form-input::placeholder { color: #f9a8d4; opacity: 0.8; }

.gr-form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #fbcfe8;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #831843;
    background: #fff1f5;
    font-family: inherit;
    line-height: 1.6;
    min-height: 70px;
}

.gr-form-textarea:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.15);
    background: #fff;
}

.gr-form-textarea::placeholder { color: #f9a8d4; opacity: 0.8; }

.gr-char-counter {
    text-align: right;
    font-size: 11px;
    color: #be185d;
    margin-top: 3px;
}

/* 中栏嵌入操作按钮 */
.gr-form-submit-btn {
    width: 100%;
    padding: 11px 0;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.35);
    margin-bottom: 14px;
}

.gr-form-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    box-shadow: 0 5px 16px rgba(236, 72, 153, 0.45);
    transform: translateY(-1px);
}

.gr-form-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.gr-form-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gr-form-submit-btn.gr-btn-loading {
    background: linear-gradient(90deg, #fce7f3 0%, #fdf2f8 35%, #fce7f3 65%, #fbcfe8 100%);
    background-size: 200% 100%;
    animation: grBtnShimmer 1.4s ease-in-out infinite;
    color: #9d174d;
    cursor: not-allowed;
}

body.dark .gr-form-submit-btn.gr-btn-loading {
    background: linear-gradient(90deg, #831843 0%, #be185d 35%, #831843 65%, #9d174d 100%);
    background-size: 200% 100%;
    animation: grBtnShimmer 1.4s ease-in-out infinite;
    color: #fce7f3;
    cursor: not-allowed;
}

/* ========== 场合按钮网格 ========== */
.gr-occasion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.gr-occasion-btn {
    padding: 5px 4px;
    border: 1.5px solid #fbcfe8;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff1f5;
    user-select: none;
    font-size: 11px;
    font-weight: 500;
    color: #9d174d;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gr-occasion-btn:hover {
    border-color: #ec4899;
    background: #fce7f3;
}

.gr-occasion-btn.selected {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #831843;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(236, 72, 153, 0.25);
}

/* 预算快捷按钮 */
.gr-budget-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.gr-budget-btn {
    padding: 5px 10px;
    border: 1.5px solid #fbcfe8;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff1f5;
    user-select: none;
    font-size: 11px;
    font-weight: 500;
    color: #9d174d;
    white-space: nowrap;
}

.gr-budget-btn:hover {
    border-color: #ec4899;
    background: #fce7f3;
}

.gr-budget-btn.selected {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #831843;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(236, 72, 153, 0.25);
}

.gr-budget-custom { margin-top: 0; }

/* 兴趣标签 */
.gr-interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.gr-interest-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #fff1f5;
    border: 1px solid #fbcfe8;
    border-radius: 10px;
    font-size: 11px;
    color: #9d174d;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
}

.gr-interest-tag:hover {
    background: #fce7f3;
    border-color: #f9a8d4;
    transform: translateY(-1px);
}

.gr-interest-tag.active {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #ec4899;
    color: #831843;
    font-weight: 600;
}

/* ========== 右栏：推荐结果 ========== */
.gr-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.gr-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #fff1f5 0%, #fdf2f8 100%);
    border-bottom: 1px solid #fbcfe8;
    flex-shrink: 0;
}

.gr-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #831843;
}

.gr-result-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.gr-meta-badge {
    display: inline-block;
    padding: 2px 9px;
    background: #fce7f3;
    color: #9d174d;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #fbcfe8;
}

.gr-budget-badge {
    background: #fff1f5;
    color: #be185d;
    border-color: #f9a8d4;
}

.gr-refresh-btn {
    padding: 3px 10px;
    background: #fff1f5;
    border: 1px solid #f9a8d4;
    border-radius: 4px;
    color: #be185d;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.18s;
    font-weight: 500;
}

.gr-refresh-btn:hover {
    background: #fce7f3;
    border-color: #ec4899;
}

.gr-result-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.gr-result-body::-webkit-scrollbar { width: 5px; }
.gr-result-body::-webkit-scrollbar-track { background: transparent; }
.gr-result-body::-webkit-scrollbar-thumb { background: #f9a8d4; border-radius: 3px; }
.gr-result-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

/* ========== 占位 / 加载 / 错误 状态 ========== */
.gr-placeholder,
.gr-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 300px;
}

.gr-placeholder-icon {
    font-size: 52px;
    margin-bottom: 18px;
    animation: grGiftBounce 2.5s ease-in-out infinite;
}

@keyframes grGiftBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30%       { transform: translateY(-10px) scale(1.05); }
    60%       { transform: translateY(-4px) scale(1.02); }
}

.gr-placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #9d174d;
    margin-bottom: 10px;
}

.gr-placeholder-desc {
    font-size: 13px;
    color: #be185d;
    margin-bottom: 4px;
}

.gr-placeholder-sub {
    margin-top: 16px;
    font-size: 13px;
    color: #db2777;
    background: #fce7f3;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid #fbcfe8;
}

/* 加载动画 */
.gr-loading-gifts {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.gr-loading-gifts span {
    font-size: 28px;
    animation: grLoadGift 1.2s ease-in-out infinite;
}

.gr-loading-gifts span:nth-child(1) { animation-delay: 0s; }
.gr-loading-gifts span:nth-child(2) { animation-delay: 0.3s; }
.gr-loading-gifts span:nth-child(3) { animation-delay: 0.6s; }

@keyframes grLoadGift {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50%       { opacity: 1;   transform: translateY(-10px); }
}

.gr-loading-text {
    font-size: 14px;
    color: #9d174d;
    font-weight: 500;
    animation: grTextPulse 1.8s ease-in-out infinite;
}

@keyframes grTextPulse {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 1; }
}

/* 输入框抖动动画（校验失败提示） */
@keyframes grInputShake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-6px); }
    30%       { transform: translateX(5px); }
    45%       { transform: translateX(-4px); }
    60%       { transform: translateX(3px); }
    75%       { transform: translateX(-2px); }
    90%       { transform: translateX(1px); }
}

.gr-input-shake {
    animation: grInputShake 0.45s ease;
    border-color: #ec4899 !important;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3) !important;
}

/* 轻量成功提示 */
.gr-tip-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    padding: 9px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
}

.gr-tip-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 结果内容淡入动画（通过 class 控制，支持重触发） */
.gr-result-content {
    padding: 20px 24px;
    flex: 1;
}

.gr-result-content.gr-animate-in {
    animation: grContentFadeIn 0.4s ease-out;
}

@keyframes grContentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 礼物推荐卡片（AI 生成 HTML 样式） ========== */
.gr-result-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 700px;
}

.gr-gift-card {
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #fff8fb 0%, #fdf2f8 100%);
    border: 1.5px solid #fbcfe8;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(236, 72, 153, 0.06);
}

.gr-gift-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #ec4899, #db2777);
    border-radius: 12px 0 0 12px;
}

.gr-gift-card:hover {
    border-color: #f9a8d4;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.14);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fff1f5 0%, #fce7f3 100%);
}

.gr-gift-rank {
    font-size: 22px;
    font-weight: 700;
    color: #ec4899;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    padding-top: 2px;
}

.gr-gift-body { flex: 1; min-width: 0; }

.gr-gift-name {
    font-size: 15px;
    font-weight: 700;
    color: #831843;
    margin-bottom: 6px;
}

.gr-gift-price {
    font-size: 13px;
    color: #db2777;
    font-weight: 600;
    margin-bottom: 7px;
    background: #fce7f3;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
}

.gr-gift-reason {
    font-size: 13px;
    color: #4a1942;
    line-height: 1.7;
    margin-bottom: 8px;
}

.gr-gift-where {
    font-size: 12px;
    color: #9d174d;
    background: #fff1f5;
    border: 1px solid #fbcfe8;
    border-radius: 5px;
    padding: 5px 10px;
}

.gr-gift-tip {
    background: linear-gradient(135deg, #fce7f3 0%, #fff1f5 100%);
    border: 1.5px solid #f9a8d4;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #831843;
    line-height: 1.7;
    font-style: italic;
    margin-top: 4px;
    position: relative;
}

.gr-gift-tip::before {
    content: '💝';
    margin-right: 6px;
}

/* ========== 错误状态 ========== */
#grResultError {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gr-result-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    border-left: 4px solid #ef4444;
    margin: 12px;
    border-radius: 6px;
    background: #fff5f5;
    min-height: 200px;
}

.gr-error-icon { font-size: 36px; margin-bottom: 12px; }

.gr-error-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gr-error-msg {
    font-size: 14px;
    color: #dc2626;
    font-weight: 500;
    margin: 0;
}

.gr-error-tip {
    font-size: 12px;
    color: #be185d;
    margin: 0;
}

.gr-retry-btn {
    margin-top: 12px;
    padding: 7px 20px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.gr-retry-btn:hover {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

/* ========== 示例模态框 ========== */
.gr-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}

.gr-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.2);
    z-index: 10001;
    flex-direction: column;
    overflow: hidden;
}

.gr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    flex-shrink: 0;
}

.gr-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.gr-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.gr-modal-close:hover { background: rgba(255, 255, 255, 0.35); }

.gr-modal-body {
    overflow-y: auto;
    padding: 16px;
}

.gr-modal-body::-webkit-scrollbar { width: 5px; }
.gr-modal-body::-webkit-scrollbar-thumb { background: #f9a8d4; border-radius: 3px; }
.gr-modal-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

.gr-example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gr-example-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff1f5;
    border: 1.5px solid #fbcfe8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.gr-example-card:hover {
    background: #fce7f3;
    border-color: #ec4899;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.gr-example-icon { font-size: 22px; flex-shrink: 0; }

.gr-example-info { flex: 1; min-width: 0; }

.gr-example-name {
    font-size: 12px;
    font-weight: 700;
    color: #831843;
    margin-bottom: 4px;
}

.gr-example-desc {
    font-size: 11px;
    color: #be185d;
    line-height: 1.5;
}

.gr-example-badge {
    display: inline-block;
    padding: 1px 6px;
    background: #fbcfe8;
    color: #9d174d;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 3px;
    margin-right: 3px;
}

/* ========== 响应式布局 ========== */
@media (max-width: 768px) {
    .gr-container { height: auto; min-height: 100vh; }
    .gr-main-content { flex-direction: column; overflow: auto; }
    .gr-history-panel { width: 100%; height: 150px; border-right: none; border-bottom: 1px solid #fbcfe8; }
    .gr-form-panel { width: 100%; border-right: none; border-bottom: 1px solid #fbcfe8; }
    .gr-result-panel { min-height: 400px; }
    .gr-occasion-grid { grid-template-columns: repeat(4, 1fr); }
    .gr-example-grid { grid-template-columns: 1fr; }
}

/* ========== 暗黑模式 ========== */
body.dark .gr-container {
    background: #1a0a12;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .gr-main-content { background: #1a0a12; }

/* 工具栏 */
body.dark .gr-toolbar {
    background: linear-gradient(135deg, #9d174d 0%, #831843 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark .gr-toolbar .toolbar-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #f9a8d4;
}

body.dark .gr-toolbar .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

body.dark .gr-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%);
    color: #fce7f3;
}

body.dark .gr-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

/* 历史栏 */
body.dark .gr-history-panel {
    background: #1c1018;
    border-right-color: #3d1a2e;
}

body.dark .gr-history-header {
    background: linear-gradient(to bottom, #230f1a 0%, #1c1018 100%);
    border-bottom-color: #3d1a2e;
}

body.dark .gr-history-header h3 { color: #f9a8d4; }
body.dark .gr-history-count { color: #f472b6; }
body.dark .gr-history-clear-btn { background: #2d1122; color: #f9a8d4; }
body.dark .gr-history-clear-btn:hover { background: #3d1a2e; }

body.dark .gr-history-search { border-bottom-color: #3d1a2e; }
body.dark .gr-history-search input {
    background: #2d1122;
    border-color: #5b2040;
    color: #fce7f3;
}
body.dark .gr-history-search input::placeholder { color: #6e4060; }
body.dark .gr-history-search input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.25);
}

body.dark .gr-history-empty { color: #c060a0; }

body.dark .gr-history-item {
    background: #2d1122;
    border-color: #3d1a2e;
}
body.dark .gr-history-item:hover {
    background: #3d1a2e;
    border-color: #ec4899;
}
body.dark .gr-history-item.active {
    background: #3d1a2e;
    border-color: #ec4899;
    box-shadow: inset 3px 0 0 #ec4899, 0 1px 4px rgba(236, 72, 153, 0.3);
}
body.dark .gr-history-item-name { color: #fce7f3; }
body.dark .gr-history-item-meta { color: #f472b6; }
body.dark .gr-history-item-type { background: #5b2040; color: #f9a8d4; }

body.dark .gr-history-list::-webkit-scrollbar-thumb { background: #5b2040; }
body.dark .gr-history-list::-webkit-scrollbar-thumb:hover { background: #ec4899; }

/* 表单栏 */
body.dark .gr-form-panel {
    background: #1c1018;
    border-right-color: #3d1a2e;
}

body.dark .gr-panel-header {
    background: linear-gradient(to bottom, #230f1a 0%, #1c1018 100%);
    border-bottom-color: #3d1a2e;
}

body.dark .gr-panel-header h3 { color: #f9a8d4; }
body.dark .gr-panel-tip { color: #f472b6; }

body.dark .gr-form-body::-webkit-scrollbar-thumb { background: #5b2040; }
body.dark .gr-form-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

body.dark .gr-form-label { color: #f9a8d4; }
body.dark .gr-required { color: #f472b6; }
body.dark .gr-optional-tag { background: #3d1a2e; color: #f9a8d4; }
body.dark .gr-shortcut-hint { color: #f472b6; opacity: 0.65; }

body.dark .gr-form-input {
    background: #2d1122;
    border-color: #5b2040;
    color: #fce7f3;
}
body.dark .gr-form-input::placeholder { color: #6e4060; }
body.dark .gr-form-input:focus {
    background: #3d1a2e;
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

body.dark .gr-form-textarea {
    background: #2d1122;
    border-color: #5b2040;
    color: #fce7f3;
}
body.dark .gr-form-textarea::placeholder { color: #6e4060; }
body.dark .gr-form-textarea:focus {
    background: #3d1a2e;
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

body.dark .gr-char-counter { color: #f472b6; }

body.dark .gr-occasion-btn {
    background: #2d1122;
    border-color: #5b2040;
    color: #f9a8d4;
}
body.dark .gr-occasion-btn:hover {
    background: #3d1a2e;
    border-color: #ec4899;
}
body.dark .gr-occasion-btn.selected {
    background: linear-gradient(135deg, #5b2040 0%, #3d1a2e 100%);
    border-color: #ec4899;
    color: #fce7f3;
}

body.dark .gr-budget-btn {
    background: #2d1122;
    border-color: #5b2040;
    color: #f9a8d4;
}
body.dark .gr-budget-btn:hover {
    background: #3d1a2e;
    border-color: #ec4899;
}
body.dark .gr-budget-btn.selected {
    background: linear-gradient(135deg, #5b2040 0%, #3d1a2e 100%);
    border-color: #ec4899;
    color: #fce7f3;
}

body.dark .gr-interest-tag {
    background: #2d1122;
    border-color: #5b2040;
    color: #f9a8d4;
}
body.dark .gr-interest-tag:hover {
    background: #3d1a2e;
    border-color: #f9a8d4;
}
body.dark .gr-interest-tag.active {
    background: linear-gradient(135deg, #5b2040 0%, #3d1a2e 100%);
    border-color: #ec4899;
    color: #fce7f3;
}

/* 结果栏 */
body.dark .gr-result-panel { background: #1c1018; }

body.dark .gr-result-header {
    background: linear-gradient(to bottom, #230f1a 0%, #1c1018 100%);
    border-bottom-color: #3d1a2e;
}
body.dark .gr-result-header h3 { color: #f9a8d4; }
body.dark .gr-meta-badge { background: #3d1a2e; color: #f9a8d4; border-color: #5b2040; }
body.dark .gr-budget-badge { background: #2d1122; color: #f472b6; }
body.dark .gr-refresh-btn { background: #2d1122; border-color: #5b2040; color: #f9a8d4; }
body.dark .gr-refresh-btn:hover { background: #3d1a2e; border-color: #ec4899; }

body.dark .gr-result-body::-webkit-scrollbar-thumb { background: #5b2040; }
body.dark .gr-result-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

/* 占位 */
body.dark .gr-placeholder-title { color: #f9a8d4; }
body.dark .gr-placeholder-desc { color: #e8b4d0; }
body.dark .gr-placeholder-sub { background: #3d1a2e; color: #fce7f3; border-color: #5b2040; }

/* 加载 */
body.dark .gr-loading-text { color: #f472b6; }

/* 礼物卡片 */
body.dark .gr-result-content { background: transparent; }

body.dark .gr-gift-card {
    background: linear-gradient(135deg, #230f1a 0%, #1c1018 100%);
    border-color: #3d1a2e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
body.dark .gr-gift-card:hover {
    background: linear-gradient(135deg, #2d1122 0%, #230f1a 100%);
    border-color: #5b2040;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.2);
}
body.dark .gr-gift-name { color: #fce7f3; }
body.dark .gr-gift-price { background: #3d1a2e; color: #f9a8d4; }
body.dark .gr-gift-reason { color: #e8c0d8; }
body.dark .gr-gift-where { background: #2d1122; border-color: #3d1a2e; color: #f9a8d4; }
body.dark .gr-gift-tip {
    background: linear-gradient(135deg, #2d1122 0%, #230f1a 100%);
    border-color: #5b2040;
    color: #f9a8d4;
}

/* 错误 */
body.dark .gr-result-error { background: #2a1010; border-left-color: #ef4444; }
body.dark .gr-error-msg { color: #f87171; }
body.dark .gr-error-tip { color: #f472b6; }

/* 模态框 */
body.dark .gr-modal {
    background: #1c1018;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

body.dark .gr-modal-header {
    background: linear-gradient(135deg, #831843 0%, #6b1236 100%);
}

body.dark .gr-example-card {
    background: #2d1122;
    border-color: #3d1a2e;
}
body.dark .gr-example-card:hover {
    background: #3d1a2e;
    border-color: #ec4899;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}
body.dark .gr-example-name { color: #fce7f3; }
body.dark .gr-example-desc { color: #f472b6; }
body.dark .gr-example-badge { background: #3d1a2e; color: #f9a8d4; }

body.dark .gr-modal-body::-webkit-scrollbar-thumb { background: #5b2040; }
body.dark .gr-modal-body::-webkit-scrollbar-thumb:hover { background: #ec4899; }

/* 中栏嵌入操作按钮 - 暗黑模式 */
body.dark .gr-form-submit-btn {
    background: linear-gradient(135deg, #9d174d 0%, #831843 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    color: #fce7f3;
}
body.dark .gr-form-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.5);
}

/* 历史删除按钮 - 暗黑模式 */
body.dark .gr-history-item-del {
    background: #3d1a2e;
    color: #f87171;
}
body.dark .gr-history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

/* 错误重试按钮 - 暗黑模式 */
body.dark .gr-retry-btn {
    background: linear-gradient(135deg, #9d174d 0%, #831843 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: #fce7f3;
}
body.dark .gr-retry-btn:hover {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}
