/* Gifts and Missions WordPress Plugin - Frontend Styles */

:root {
    --gam-primary: #1B365D;
    --gam-primary-dark: #122440;
    --gam-secondary: #004A59;
    --gam-accent: #D4AF37;
    --gam-accent-hover: #b89628;
    --gam-bg-light: #F8FAF9;
    --gam-card-bg: #FFFFFF;
    --gam-text-dark: #1e293b;
    --gam-text-muted: #64748b;
    --gam-border-color: #e2e8f0;
    --gam-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --gam-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --gam-radius: 10px;
    --gam-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gam-wrapper {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gam-text-dark);
    max-width: 960px;
    margin: 30px auto;
    padding: 0 15px;
}

.gam-wrapper h2, 
.gam-wrapper h3, 
.gam-wrapper h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--gam-primary);
    margin-top: 0;
}

/* Hero Header */
.gam-header-hero {
    text-align: center;
    background: linear-gradient(135deg, var(--gam-primary) 0%, var(--gam-secondary) 100%);
    color: #ffffff;
    padding: 35px 25px;
    border-radius: var(--gam-radius);
    margin-bottom: 25px;
    box-shadow: var(--gam-shadow-md);
}

.gam-header-hero .gam-title {
    color: #ffffff;
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.gam-header-hero .gam-subtitle {
    font-size: 1.05rem;
    color: #e2e8f0;
    margin: 0;
}

/* Card Container */
.gam-card {
    background: var(--gam-card-bg);
    border-radius: var(--gam-radius);
    padding: 30px;
    box-shadow: var(--gam-shadow-md);
    border: 1px solid var(--gam-border-color);
    margin-bottom: 25px;
}

/* Auth Card */
.gam-auth-card {
    max-width: 520px;
    margin: 40px auto;
    text-align: center;
}

.gam-auth-header {
    margin-bottom: 25px;
}

.gam-icon-badge {
    width: 64px;
    height: 64px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gam-accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.gam-auth-card p {
    color: var(--gam-text-muted);
}

#gam-login-form {
    text-align: left;
    background: var(--gam-bg-light);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--gam-border-color);
}

#gam-login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--gam-text-dark);
}

#gam-login-form input[type="text"],
#gam-login-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gam-border-color);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

#gam-login-form input[type="submit"] {
    background: var(--gam-primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--gam-transition);
}

#gam-login-form input[type="submit"]:hover {
    background: var(--gam-primary-dark);
}

.gam-social-auth-section {
    margin-top: 25px;
}

.gam-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.gam-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gam-border-color);
}

.gam-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gam-text-muted);
    letter-spacing: 0.05em;
}

/* Tabs Navigation */
.gam-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gam-border-color);
    padding-bottom: 2px;
}

.gam-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gam-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--gam-transition);
}

.gam-tab-btn:hover {
    color: var(--gam-primary);
}

.gam-tab-btn.active {
    color: var(--gam-primary);
    border-bottom-color: var(--gam-accent);
}

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

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

/* Progress Bar */
.gam-progress-container {
    margin-bottom: 25px;
}

.gam-progress-bar-wrap {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gam-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gam-accent) 0%, var(--gam-secondary) 100%);
    transition: width 0.3s ease;
}

.gam-progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gam-text-muted);
    text-align: right;
}

/* Instructions & Scale */
.gam-instructions-box {
    background: var(--gam-bg-light);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--gam-accent);
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.gam-scale-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.gam-scale-legend span {
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--gam-border-color);
    font-size: 0.8rem;
}

/* Question Rows */
.gam-q-row {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-bottom: 1px solid var(--gam-border-color);
    transition: background 0.2s;
}

.gam-q-row:hover {
    background: rgba(248, 250, 249, 0.5);
}

.gam-q-text {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    font-size: 0.98rem;
    line-height: 1.5;
}

.gam-q-num {
    font-weight: 700;
    color: var(--gam-primary);
    min-width: 32px;
}

.gam-rating-group {
    display: flex;
    gap: 10px;
    align-self: flex-end;
}

.gam-rating-label {
    cursor: pointer;
}

.gam-rating-label input[type="radio"] {
    display: none;
}

.gam-radio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--gam-border-color);
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--gam-text-dark);
    transition: var(--gam-transition);
}

.gam-rating-label:hover .gam-radio-btn {
    border-color: var(--gam-accent);
    color: var(--gam-accent);
    transform: scale(1.08);
}

.gam-rating-label input[type="radio"]:checked + .gam-radio-btn {
    background: var(--gam-primary);
    border-color: var(--gam-primary);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.2);
}

/* Forms & Selects */
.gam-form-group {
    margin-bottom: 20px;
}

.gam-form-group label {
    display: block;
    margin-bottom: 8px;
}

.gam-select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--gam-border-color);
    font-size: 1rem;
    background: #ffffff;
}

.gam-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--gam-transition);
}

.gam-btn-primary {
    background: var(--gam-primary);
    color: #ffffff;
}

.gam-btn-primary:hover {
    background: var(--gam-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--gam-shadow-md);
}

/* Calculation Preview */
.gam-calc-preview {
    background: var(--gam-bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gam-top3-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.gam-badge-preview {
    background: var(--gam-primary);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* History List */
.gam-history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gam-history-item {
    background: var(--gam-bg-light);
    border: 1px solid var(--gam-border-color);
    border-radius: 8px;
    padding: 20px;
}

.gam-history-item.gam-latest-entry {
    border-left: 4px solid var(--gam-accent);
}

.gam-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gam-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gam-text-muted);
}

.gam-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.gam-badge-active {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.gam-badge-historical {
    background: #e2e8f0;
    color: var(--gam-text-muted);
}

.gam-history-top3 {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.gam-top-pill {
    background: #ffffff;
    border: 1px solid var(--gam-border-color);
    padding: 8px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gam-top-pill .rank {
    font-weight: 800;
    color: var(--gam-accent);
}

.gam-top-pill .gift-name {
    font-weight: 600;
}

.gam-top-pill .score {
    color: var(--gam-text-muted);
    font-size: 0.85rem;
}

.gam-scores-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.gam-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.gam-score-row .g-name {
    width: 95px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.gam-score-row .g-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.gam-score-row .g-bar-fill {
    height: 100%;
    background: var(--gam-primary);
}

.gam-score-row .g-val {
    width: 38px;
    text-align: right;
    font-weight: 700;
}

/* History Actions */
.gam-history-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--gam-border-color);
    flex-wrap: wrap;
}

.gam-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.gam-btn-pdf {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.gam-btn-pdf:hover {
    background: #0369a1;
    border-color: #0369a1;
    color: #ffffff;
}

.gam-btn-print {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.gam-btn-print:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.gam-btn-export {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.gam-btn-export:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.gam-btn-delete {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
    margin-left: auto;
}

.gam-btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.gam-spinner {
    animation: gam-spin 1s linear infinite;
}

@keyframes gam-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modal Overlay */
.gam-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.gam-modal-content {
    background: #ffffff;
    padding: 35px;
    border-radius: var(--gam-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Custom Confirmation Modal */
.gam-modal-confirm {
    text-align: center;
    max-width: 440px;
    padding: 30px 24px;
}

.gam-confirm-icon {
    width: 56px;
    height: 56px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.gam-modal-confirm h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.gam-modal-confirm p {
    margin: 0 0 24px 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.gam-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.gam-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gam-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* PDF Preview Modal */
.gam-modal-pdf-preview {
    max-width: 760px;
    width: 95%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.gam-pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.gam-pdf-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.gam-pdf-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.gam-pdf-modal-close:hover {
    color: #0f172a;
}

.gam-pdf-modal-body {
    padding: 24px;
    overflow-y: auto;
    background: #f1f5f9;
}

.gam-pdf-render-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 30px;
    margin: 0 auto;
    max-width: 680px;
}

.gam-pdf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.gam-btn-primary {
    background: #0284c7;
    color: #ffffff;
    border: 1px solid #0284c7;
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.gam-btn-primary:hover {
    background: #0369a1;
    border-color: #0369a1;
}

.gam-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #dc2626;
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gam-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Toast Banners */
.gam-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.gam-toast {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    animation: gam-toast-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #0284c7;
}

.gam-toast-success {
    border-left-color: #16a34a;
    color: #14532d;
    background: #f0fdf4;
}

.gam-toast-error {
    border-left-color: #dc2626;
    color: #7f1d1d;
    background: #fef2f2;
}

.gam-toast-info {
    border-left-color: #0284c7;
    color: #0c4a6e;
    background: #f0f9ff;
}

@keyframes gam-toast-slide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 640px) {
    .gam-q-row {
        align-items: flex-start;
    }
    .gam-rating-group {
        align-self: center;
        margin-top: 10px;
    }
    .gam-radio-btn {
        width: 36px;
        height: 36px;
    }
}

/* Survey Multi-Page Pagination Styles */
.gam-survey-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background: var(--gam-bg-light);
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--gam-border-color);
}

.gam-survey-page-info {
    font-size: 0.92rem;
    color: var(--gam-text-dark);
}

.gam-survey-step-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gam-step-pill {
    background: #ffffff;
    border: 1px solid var(--gam-border-color);
    color: var(--gam-text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gam-transition);
}

.gam-step-pill:hover {
    border-color: var(--gam-primary);
    color: var(--gam-primary);
}

.gam-step-pill.active {
    background: var(--gam-primary);
    border-color: var(--gam-primary);
    color: #ffffff;
}

.gam-step-pill.completed:not(.active) {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.gam-survey-page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.gam-btn-secondary {
    background: #e2e8f0;
    color: var(--gam-text-dark);
}

.gam-btn-secondary:hover {
    background: #cbd5e1;
}

.gam-btn-success {
    background: #16a34a;
    color: #ffffff;
}

.gam-btn-success:hover {
    background: #15803d;
}

.gam-q-highlight {
    background-color: rgba(254, 240, 138, 0.4) !important;
    transition: background-color 0.3s ease;
}

/* Member History Header & Pagination */
.gam-history-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.gam-history-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--gam-text-muted);
    font-weight: 600;
}

.gam-select-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--gam-border-color);
}

.gam-history-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--gam-bg-light);
    border: 1px solid var(--gam-border-color);
    border-radius: 8px;
}

.gam-history-page-info {
    font-size: 0.85rem;
    color: var(--gam-text-muted);
    font-weight: 600;
}

.gam-history-page-buttons {
    display: flex;
    gap: 6px;
}

.gam-page-btn {
    background: #ffffff;
    border: 1px solid var(--gam-border-color);
    color: var(--gam-text-dark);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gam-transition);
}

.gam-page-btn:hover:not(.disabled) {
    background: var(--gam-bg-light);
    border-color: var(--gam-primary);
    color: var(--gam-primary);
}

.gam-page-btn.active {
    background: var(--gam-primary);
    border-color: var(--gam-primary);
    color: #ffffff;
}

.gam-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   MEMBER & PUBLIC MISSIONS CATALOG STYLES
   ========================================== */

.gam-personal-banner-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 5px solid #0284c7;
    border-radius: var(--gam-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.gam-personal-banner-card.notice-info {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-left-color: #64748b;
}

.gam-personal-banner-card h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0369a1;
}

.gam-personal-banner-card.notice-info h4 {
    color: #334155;
}

.gam-user-gifts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.gam-user-gift-pill {
    background: #0284c7;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.2);
}

.gam-user-gift-pill .pill-rank {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 10px;
}

.gam-banner-subtext {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.gam-personal-banner-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.45;
}

.gam-public-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--gam-radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    color: #475569;
    font-size: 0.9rem;
}

.gam-public-banner p {
    margin: 0;
}

.gam-filter-bar {
    padding: 20px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--gam-border-color);
    border-radius: var(--gam-radius);
}

.gam-filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.gam-filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gam-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.gam-filter-actions-group {
    display: flex;
    gap: 10px;
}

.gam-missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.gam-mission-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gam-mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.gam-mission-card-header {
    padding: 20px 20px 14px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.gam-mission-card-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.gam-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    line-height: 1.3;
}

.gam-mission-card-body {
    padding: 18px 20px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gam-mission-card-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    position: relative;
    cursor: pointer;
}

.gam-mission-card-desc .gam-desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gam-mission-card-desc .gam-tooltip-content {
    visibility: hidden;
    opacity: 0;
    width: 290px;
    background-color: #0f172a;
    color: #f8fafc;
    text-align: left;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    position: absolute;
    z-index: 10000;
    bottom: 120%;
    left: 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}

.gam-mission-card-desc .gam-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.gam-mission-card-desc:hover .gam-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(-4px);
}

.gam-mission-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
}

.gam-mission-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gam-mission-card-gifts {
    margin-top: 4px;
}

.gam-mission-card-gifts .gifts-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.gifts-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gam-gift-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 500;
}

.gam-gift-badge-matched {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #7dd3fc !important;
    font-weight: 700 !important;
}

.gam-mission-card-footer {
    padding: 14px 20px 18px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

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

.gam-public-notice {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: center;
    display: block;
}

.gam-no-missions-card {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

