/* Quest Card Styles */
.quest-card {
    transition: transform 0.2s;
}

.quest-card:hover {
    transform: translateY(-2px);
}

.quest-status-open {
    border-left: 4px solid #198754; /* Green - matches bg-success */
}

.quest-status-finalized {
    border-left: 4px solid #0d6efd; /* Blue - matches bg-primary */
}

.quest-status-done {
    border-left: 4px solid #212529; /* Dark - matches bg-dark */
}

/* Date and Vote Styles */
.date-option {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.date-option:hover {
    background-color: #f8f9fa;
}

.vote-summary {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Form Input Fixes */
.form-control:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* Shop Styles - Witcher 3 Inspired */
.shop-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.shop-header {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.shop-header h1 {
    font-family: 'Cinzel', serif;
    color: #ffc107;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.shop-categories {
    margin-bottom: 2rem;
}

.category-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #444;
    color: #fff;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-btn:hover, .category-btn.active {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.shop-inventory {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 500px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.item-card {
    background: rgba(20, 20, 30, 0.9);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.item-card:hover::before {
    left: 100%;
}

.item-card:hover {
    border-color: #ffc107;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.item-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    flex-grow: 1;
    color: #F4E4BC !important;
    text-shadow: none !important;
}

.item-name.text-light {
    color: #F4E4BC !important;
    text-shadow: none !important;
}

.item-rarity {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.rarity-common { 
    background: #6c757d; 
    color: white; 
}

.rarity-uncommon { 
    background: #198754; 
    color: white; 
}

.rarity-rare { 
    background: #0d6efd; 
    color: white; 
}

.rarity-veryrare { 
    background: #6f42c1; 
    color: white; 
}

.rarity-legendary { 
    background: linear-gradient(45deg, #dc3545, #ffc107);
    color: white;
    animation: legendary-glow 2s ease-in-out infinite alternate;
}

@keyframes legendary-glow {
    0% { box-shadow: 0 0 5px rgba(220, 53, 69, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 193, 7, 0.8); }
}

.item-description {
    color: rgba(244, 228, 188, 0.8) !important;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #444;
    margin-top: 0;
}

.item-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc107;
}

.item-stock {
    color: rgba(244, 228, 188, 0.7) !important;
    font-size: 0.85rem;
}

.item-stock.unlimited {
    color: #198754;
}

.item-stock.low {
    color: #dc3545;
}

.item-stock.sold-out {
    color: #6c757d;
    font-style: italic;
}

.purchase-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.purchase-btn:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.purchase-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.empty-shop {
    text-align: center;
    color: #6c757d;
    padding: 3rem;
    font-size: 1.1rem;
}

.shop-merchant {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.shop-merchant:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.5);
}

.form-control.bg-dark {
    background-color: #343a40 !important;
    color: #ffffff !important;
    border-color: #ffc107;
}

.form-control.bg-dark:focus {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

/* Radio Button and Checkbox Fixes */
.form-check-input {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-top: 0.125rem !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #8B4513 !important;
    border-radius: 0.25rem !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
}

.form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.form-check-input:checked {
    background-color: #ffc107 !important;
    border-color: #8B4513 !important;
}

.form-check-input[type="radio"]:checked {
    background-image: radial-gradient(circle, #8B4513 40%, transparent 41%) !important;
}

.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.form-check-input:focus {
    border-color: #8B4513 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
}

.form-check-input:disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.form-check-label {
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    font-weight: 500 !important;
    margin-left: 0.5rem !important;
    cursor: pointer !important;
}

/* Fantasy Quest Board Styles */
:root {
    /* Main card width - change this single value to resize all cards */
    --card-width: 350px;
    
    /* Calculated responsive widths (automatically scaled) */
    --card-width-tablet: calc(var(--card-width) * 0.89); /* 375px from 420px */
    --card-width-mobile: calc(var(--card-width) * 0.79); /* 330px from 420px */
    --card-width-small: calc(var(--card-width) * 0.71);  /* 300px from 420px */
}

body {
    background-image: url('/images/Notice Board-blank2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Remove all white backgrounds - keep fantasy theme fully visible */

/* Override Bootstrap defaults */
.container, .container-fluid {
    background: none !important;
}

/* Only override max-width for the main content container, not navbar */
.container.mt-4 {
    max-width: none !important;
}

/* Full width for home page quest board */
body:has(.quest-board-container) .container.mt-3 {
    max-width: none !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* Fallback for browsers that don't support :has() */
.home-page .container.mt-3 {
    max-width: none !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* Remove any default form backgrounds */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #8B4513;
    color: #1a0f08;
    font-weight: 600;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #654321;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.3);
}

/* Alert styling without heavy backgrounds */
.alert {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid;
    color: #1a0f08;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.95),
                 -1px -1px 2px rgba(255, 255, 255, 0.95);
}

.alert-info {
    border-color: #0dcaf0;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.9) !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Remove backgrounds from lists and other elements */
ul, ol, li {
    background: none;
}

/* Remove any remaining Bootstrap backgrounds */
.list-unstyled {
    background: none;
}

/* Ensure body background shows through */
main {
    background: none;
}

/* Remove any remaining white blocks */
div {
    background: transparent;
}

/* Exception for Quest Log - needs specific backgrounds */
.quest-log-container div,
.quest-log-card div,
.quest-log-card-header,
.quest-log-card-body,
.quest-log-card-footer,
.quest-log-header,
.empty-quest-log {
    background: initial; /* Reset to allow specific backgrounds below */
}

/* Only keep form control backgrounds for usability */
.form-control, .form-select, input, textarea, select {
    background-color: rgba(255, 255, 255, 0.85) !important;
}

/* Fantasy themed navbar with brown background - exclude footer */
.navbar:not(footer) {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.5) 0%, rgba(160, 82, 45, 0.5) 50%, rgba(205, 133, 63, 0.5) 100%) !important;
    border-bottom: 2px solid rgba(139, 69, 19, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
}

/* Ensure footer navbar remains transparent */
footer.navbar {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Add padding to body to account for fixed navbar */
body {
    padding-top: 56px; /* Standard Bootstrap navbar height */
}

.navbar-brand {
    color: #F4E4BC !important;
    font-family: 'Cinzel', serif !important;
    font-weight: bold !important;
    font-size: 1.5rem !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9),
                 -1px -1px 3px rgba(0, 0, 0, 0.9),
                 2px 2px 8px rgba(0, 0, 0, 0.8),
                 1px 1px 2px rgba(255, 215, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.navbar-brand:hover {
    color: #FFD700 !important;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.95),
                 -1px -1px 4px rgba(0, 0, 0, 0.95),
                 3px 3px 10px rgba(0, 0, 0, 0.8),
                 1px 1px 3px rgba(255, 215, 0, 0.5) !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: #F4E4BC !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.3s ease !important;
    border-radius: 5px;
    margin: 0 0.25rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: #FFD700 !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.95),
                 -1px -1px 3px rgba(0, 0, 0, 0.95),
                 2px 2px 8px rgba(0, 0, 0, 0.8) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link:focus {
    color: #FFD700 !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
}

.navbar-toggler {
    border: 2px solid #F4E4BC !important;
    border-radius: 5px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 8px rgba(244, 228, 188, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28244, 228, 188, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Enhanced text readability with stronger shadows instead of backgrounds */
h1, h2, h3, h4, h5, h6 {
    color: #1a0f08;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9), 
                 -1px -1px 2px rgba(255, 255, 255, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

.form-label {
    color: #1a0f08;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9), 
                 -1px -1px 2px rgba(255, 255, 255, 0.9),
                 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.form-text {
    color: #2c1810;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9),
                 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced card styling without backgrounds */
.card {
    background: none;
    border: 2px solid #8B4513;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: none;
    border-bottom: 2px solid #8B4513;
    color: #1a0f08;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(255, 255, 255, 0.95), 
                 -1px -1px 3px rgba(255, 255, 255, 0.95),
                 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.card-body {
    background: none;
    color: #1a0f08;
}

/* Enhanced text contrast with stronger shadows */
p, li, span, small {
    color: #1a0f08;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9),
                 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.text-muted {
    color: #2c1810 !important;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9) !important;
}

/* Button enhancements */
.btn {
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    border-width: 2px;
}

.btn-primary {
    background: linear-gradient(45deg, #8B4513, #A0522D) !important;
    border-color: #654321 !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #A0522D, #CD853F) !important;
    border-color: #654321 !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #858a8e) !important;
    border-color: #545b62 !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #858a8e, #9ca2a8) !important;
    border-color: #545b62 !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.btn-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22) !important;
    border-color: #d68910 !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #e67e22, #d35400) !important;
    border-color: #d68910 !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
    border-color: #bd2130 !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c0392b, #a93226) !important;
    border-color: #bd2130 !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496) !important;
    border-color: #117a8b !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.btn-info:hover {
    background: linear-gradient(45deg, #138496, #10707f) !important;
    border-color: #117a8b !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.quest-board-container {
    padding: 1rem;
    margin: 0 auto;
    position: relative;
    width: 100%;
    max-width: none;
}

.fantasy-quest-card {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: var(--card-width);
    /* Height will be set dynamically by JavaScript based on image proportions */
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.3));
    break-inside: avoid;
    display: inline-block;
}

.fantasy-quest-card:hover {
    transform: scale(1.05) rotate(1deg);
    filter: drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.4));
}

.quest-content {
    position: absolute;
    top: 10%;
    left: 12%;
    right: 12%;
    bottom: 12%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    color: #2c1810;
    text-align: center;
    /* Dynamic height-based layout */
    justify-content: space-between;
}

.quest-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.challenge-rating {
    position: absolute;
    top: 5%;
    left: 8%;
    z-index: 10;
    transform: rotate(-5deg);
    pointer-events: none;
}

.cr-badge {
    background: linear-gradient(135deg, #8B4513, #A0522D) !important;
    color: #FFD700 !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem !important;
    border: 2px solid #FFD700 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

.cr-icon {
    font-size: 1.2rem;
    color: #FFD700;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.7));
}


.quest-top {
    /* Title section at top */
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.quest-middle {
    /* Description section - fills remaining space */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0.5rem 0;
    min-height: 0; /* Allow flex item to shrink */
}

.quest-bottom {
    /* Info section at bottom */
    flex-shrink: 0;
    margin-top: 1rem;
}

.quest-title {
    font-family: 'Cinzel', serif !important;
    font-size: 1.6rem !important;
    font-weight: bold !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    color: #1a0f08 !important;
    text-shadow: 3px 3px 6px rgba(255,255,255,0.95), 
                 -1px -1px 3px rgba(255,255,255,0.95),
                 2px 2px 8px rgba(0,0,0,0.8) !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-height: 3.84rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 1.92rem !important;
    width: 100% !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.quest-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1a0f08;
    font-style: italic;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.95),
                 -1px -1px 2px rgba(255,255,255,0.95),
                 1px 1px 6px rgba(0,0,0,0.7);
    /* Fill available space with scrolling if needed */
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #8B4513 rgba(255, 255, 255, 0.3);
    /* Align content to top */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

/* Custom scrollbar styling for fantasy quest cards */
.quest-description::-webkit-scrollbar {
    width: 6px;
}

.quest-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.quest-description::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 3px;
}

.quest-dm, .quest-date, .quest-players, .quest-signups {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #1a0f08;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.95),
                 -1px -1px 2px rgba(255,255,255,0.95),
                 1px 1px 5px rgba(0,0,0,0.6);
}

/* Wax Seal Styling */
.wax-seal {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.seal-image {
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.7));
}

/* Different styling for open vs finalized quests */
.open-seal {
    display: none; /* Hide seal completely for open quests */
}

.finalized-seal {
    opacity: 1;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.8)) 
            saturate(1.4) brightness(1.2) contrast(1.1);
}

/* User signup seal styling */
.user-signup-seal {
    transform: translate(50%, 50%); /* Different positioning for top-right corner */
}

.signup-seal-image {
    opacity: 1;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.8)) 
            hue-rotate(180deg) saturate(1.5) brightness(1.1); /* Blue/green tint */
}

/* Hover effect for quest cards affects both seals */
.fantasy-quest-card:hover .seal-image {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.8)) 
            brightness(1.3) saturate(1.3);
}

.fantasy-quest-card:hover .signup-seal-image {
    transform: scale(1.15) rotate(-8deg); /* Rotate in opposite direction */
    filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.8)) 
            hue-rotate(180deg) saturate(1.6) brightness(1.3);
}


/* JavaScript masonry layout - no CSS media queries needed */


@media (max-width: 580px) {
    .quest-board-container {
        column-count: 1;
        padding: 0.5rem;
        max-width: var(--card-width-tablet);
        margin: 0 auto;
    }
    
    .fantasy-quest-card {
        width: var(--card-width-tablet);
        /* Height calculated dynamically */
    }
}

@media (max-width: 480px) {
    .quest-board-container {
        column-count: 1;
        padding: 0.5rem;
        max-width: var(--card-width-mobile);
        margin: 0 auto;
    }
    
    .fantasy-quest-card {
        width: var(--card-width-mobile);
        /* Height calculated dynamically */
    }
}
    
    .quest-description {
        font-size: 0.8rem;
    }
    
    /* Responsive wax seal sizing */
    .seal-image {
        width: 65px;
        height: 65px;
    }
    
    .signup-seal-image {
        width: 65px;
        height: 65px;
    }
    
    /* Responsive dice icon sizing */
    .difficulty-icon {
        font-size: 45px;
    }
    
    .difficulty-dice {
        top: 4%;
        left: 6%;
    }


@media (max-width: 320px) {
    .fantasy-quest-card {
        width: var(--card-width-small);
        /* Height calculated dynamically */
    }
    
    .quest-title {
        font-size: 1rem;
    }
    
    .quest-description {
        font-size: 0.75rem;
    }
    
    /* Smaller wax seals on mobile */
    .seal-image {
        width: 55px;
        height: 55px;
    }
    
    .signup-seal-image {
        width: 55px;
        height: 55px;
    }
    
    /* Smaller dice icons on mobile */
    .difficulty-icon {
        font-size: 40px;
    }
    
    .difficulty-dice {
        top: 3%;
        left: 5%;
    }
}

/* Modern Semi-Transparent Card Styling */
.modern-card {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease;
}

.modern-card:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px);
}

.modern-card-header {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px 12px 0 0 !important;
    color: #1a1a1a !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.modern-card-header h1,
.modern-card-header h2,
.modal-body h1,
.modal-body h2 {
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 
                 -1px -1px 2px rgba(0, 0, 0, 0.9), 
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
}

.modern-card-body {
    background: transparent !important;
    color: #1a1a1a !important;
    padding: 1.5rem;
}

.modern-card-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0 0 12px 12px !important;
}

/* Modern text styling */
.modern-card h1,
.modern-card h2,
.modern-card h3,
.modern-card h4,
.modern-card h5,
.modern-card h6 {
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600;
}

.modern-card p,
.modern-card li,
.modern-card span,
.modern-card small {
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500;
}

.modern-card .text-muted {
    color: rgba(244, 228, 188, 0.7) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
}

.modern-card .form-label {
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600;
}

.modern-card .form-text {
    color: rgba(244, 228, 188, 0.7) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
    font-weight: 400;
}

/* Modern form styling within cards */
.modern-card .form-control,
.modern-card .form-select {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px;
    color: #1a1a1a !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modern-card .form-control:focus,
.modern-card .form-select:focus {
    background-color: rgba(255, 255, 255, 1) !important;
    border-color: #3498db !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
    color: #1a1a1a !important;
}

/* Modern alert styling */
.modern-card .alert {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px;
    color: #1a1a1a !important;
    text-shadow: none !important;
    font-weight: 500;
}

.modern-card .alert-info {
    background-color: rgba(52, 152, 219, 0.9) !important;
    border-color: rgba(52, 152, 219, 1) !important;
    color: #ffffff !important;
}

.modern-card .alert-success {
    background-color: rgba(39, 174, 96, 0.9) !important;
    border-color: rgba(39, 174, 96, 1) !important;
    color: #ffffff !important;
}

.modern-card .alert-warning {
    background-color: rgba(241, 196, 15, 0.9) !important;
    border-color: rgba(241, 196, 15, 1) !important;
    color: #1a1a1a !important;
}

.modern-card .alert-danger {
    background-color: rgba(220, 53, 69, 0.9) !important;
    border-color: rgba(220, 53, 69, 1) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Modern badge styling */
.modern-card .badge {
    border-radius: 6px;
    font-weight: 500;
    text-shadow: none !important;
}

/* Modern button styling within cards */
.modern-card .btn {
    border-radius: 8px;
    font-weight: 500;
    text-shadow: none !important;
    transition: all 0.3s ease;
}

.modern-card .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    border: none !important;
    color: white !important;
}

.modern-card .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1e6091) !important;
    transform: translateY(-1px);
}


.modern-card .btn-success {
    background: linear-gradient(135deg, #27ae60, #219a52) !important;
    border: none !important;
    color: white !important;
}

.modern-card .btn-success:hover {
    background: linear-gradient(135deg, #219a52, #1e8449) !important;
    transform: translateY(-1px);
}

/* Modern table styling within cards */
.modern-card .table {
    color: #F4E4BC !important;
    background-color: transparent !important;
}

.modern-card .table th {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    font-weight: 600;
    text-shadow: none !important;
}

.modern-card .table td {
    border-color: rgba(244, 228, 188, 0.3) !important;
    color: #F4E4BC !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
}

/* Enhanced table styling for better readability */
.modern-card .table {
    color: #1a0f08 !important;
    margin-bottom: 0;
}

.modern-card .table th {
    background-color: rgba(139, 69, 19, 0.8) !important;
    color: #F4E4BC !important;
    border-color: #8B4513 !important;
    font-weight: bold !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    padding: 12px 8px !important;
}

.modern-card .table td {
    background-color: rgba(244, 228, 188, 0.85) !important;
    color: #1a0f08 !important;
    border-color: rgba(139, 69, 19, 0.3) !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9) !important;
    padding: 12px 8px !important;
}

.modern-card .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(244, 228, 188, 0.7) !important;
}

.modern-card .table-hover > tbody > tr:hover > td {
    background-color: rgba(255, 215, 0, 0.4) !important;
    transition: background-color 0.2s ease !important;
}

/* Email link styling for tables */
.modern-card .table .email-link {
    color: #8B4513 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9) !important;
    transition: color 0.2s ease !important;
}

.modern-card .table .email-link:hover {
    color: #654321 !important;
    text-decoration: underline !important;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.95) !important;
}

/* Scrollable quest details for modern cards */
.modern-card .card-text {
    max-height: 125px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 228, 188, 0.7) rgba(255, 255, 255, 0.1);
}

.modern-card .card-text::-webkit-scrollbar {
    width: 6px;
}

.modern-card .card-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modern-card .card-text::-webkit-scrollbar-thumb {
    background: rgba(244, 228, 188, 0.7);
    border-radius: 3px;
}

/* Custom FontAwesome Radio Button Styling */
.custom-radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.custom-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: #F4E4BC;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 500;
}

.custom-radio-label:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Hover state colors for better visibility */
.custom-radio-label[data-vote="yes"]:hover i {
    color: #28a745 !important; /* Green on hover */
}

.custom-radio-label[data-vote="maybe"]:hover i {
    color: #ffc107 !important; /* Yellow on hover */
}

.custom-radio-label[data-vote="no"]:hover i {
    color: #dc3545 !important; /* Red on hover */
}

.custom-radio-label[data-vote="novote"]:hover i {
    color: #6c757d !important; /* Gray on hover */
}

.custom-radio-label i {
    font-size: 1.25rem;
    transition: all 0.2s ease;
    color: #6c757d; /* Gray for unselected */
}

/* Unselected state */
.custom-radio-label[data-vote="yes"] i {
    color: #6c757d;
}

.custom-radio-label[data-vote="maybe"] i {
    color: #6c757d;
}

.custom-radio-label[data-vote="no"] i {
    color: #6c757d;
}

.custom-radio-label[data-vote="novote"] i {
    color: #6c757d;
}

/* Selected state colors */
input[type="radio"]:checked + .custom-radio-label[data-vote="yes"] i {
    color: #28a745; /* Green for Yes */
}

input[type="radio"]:checked + .custom-radio-label[data-vote="maybe"] i {
    color: #ffc107; /* Yellow for Maybe */
}

input[type="radio"]:checked + .custom-radio-label[data-vote="no"] i {
    color: #dc3545; /* Red for No */
}

input[type="radio"]:checked + .custom-radio-label[data-vote="novote"] i {
    color: #6c757d; /* Gray for No Vote */
}

/* Selected state styling */
input[type="radio"]:checked + .custom-radio-label {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type="radio"]:checked + .custom-radio-label[data-vote="yes"] {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

input[type="radio"]:checked + .custom-radio-label[data-vote="maybe"] {
    border-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

input[type="radio"]:checked + .custom-radio-label[data-vote="no"] {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

input[type="radio"]:checked + .custom-radio-label[data-vote="novote"] {
    border-color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
}

/* Focus state */
input[type="radio"]:focus + .custom-radio-label {
    outline: 2px solid rgba(255, 193, 7, 0.5);
    outline-offset: 2px;
}

/* Clickable date blocks */
.date-option {
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced clickable date blocks for manage page */
.manage-date-option {
    cursor: pointer;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.manage-date-option:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.manage-date-option input[type="radio"]:checked ~ * {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.manage-date-option input[type="radio"]:checked {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

/* Purchase History Side Panel Styles */
.purchase-history-panel {
    position: fixed;
    top: 56px; /* Height of Bootstrap navbar */
    left: 0;
    width: 280px;
    height: calc(100vh - 56px);
    background: rgba(15, 15, 25, 0.95);
    border-right: 3px solid #ffc107;
    border-top: 2px solid rgba(139, 69, 19, 0.9); /* Connect with navbar border */
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1025; /* Below navbar but above other content */
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    margin: 0; /* Remove all margins */
    padding: 0; /* Remove all padding */
}

.purchase-history-panel .panel-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #444;
    color: #F4E4BC;
    padding: 1rem;
    font-family: 'Cinzel', serif;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-shadow: none !important;
}

.purchase-history-panel .panel-header h6 {
    color: #F4E4BC !important;
    text-shadow: none !important;
}

.purchase-history-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #ffc107 rgba(0, 0, 0, 0.3);
}

.purchase-history-panel .panel-body::-webkit-scrollbar {
    width: 8px;
}

.purchase-history-panel .panel-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.purchase-history-panel .panel-body::-webkit-scrollbar-thumb {
    background: #ffc107;
    border-radius: 4px;
}

.purchase-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.purchase-item:hover {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.purchase-name {
    color: #F4E4BC;
    font-size: 0.85rem;
    line-height: 1.2;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px -1px 2px rgba(0, 0, 0, 0.9),
                 -1px 1px 2px rgba(0, 0, 0, 0.9);
}

.purchase-details {
    margin-top: 0.25rem;
}

.purchase-details small {
    font-size: 0.75rem;
    color: #F4E4BC !important;
    text-shadow: none !important;
}

.purchase-details .text-muted {
    color: rgba(244, 228, 188, 0.7) !important;
    text-shadow: none !important;
}

.purchase-details .text-warning {
    color: #ffc107 !important;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px -1px 2px rgba(0, 0, 0, 0.9),
                 -1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* Fix date styling in purchase items */
.purchase-item small.text-muted {
    color: rgba(244, 228, 188, 0.7) !important;
    text-shadow: none !important;
}

/* Shop container adjustment when panel is present */
.shop-container.with-panel {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .purchase-history-panel {
        width: 250px;
    }

    .shop-container.with-panel {
        margin-left: 250px;
    }
}

@media (max-width: 991.98px) {
    .purchase-history-panel {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .purchase-history-panel.mobile-open {
        transform: translateX(0);
    }

    .shop-container.with-panel {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .purchase-history-panel {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .purchase-history-panel.mobile-open {
        transform: translateX(0);
    }

    .shop-container.with-panel {
        margin-left: 0;
    }
}

/* Return/Sell buttons that appear on hover */
.return-sell-buttons {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.return-sell-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.return-sell-buttons .btn-success {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    border-color: #1e7e34 !important;
    color: white !important;
}

.return-sell-buttons .btn-success:hover {
    background: linear-gradient(45deg, #218838, #1a9174) !important;
    border-color: #1c7430 !important;
}

.return-sell-buttons .btn-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800) !important;
    border-color: #d39e00 !important;
    color: #212529 !important;
}

.return-sell-buttons .btn-warning:hover {
    background: linear-gradient(45deg, #e0a800, #c69500) !important;
    border-color: #b08800 !important;
}

/* Success colored items for sold/returned transactions */
.purchase-details .text-success {
    color: #28a745 !important;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9),
                 -1px -1px 2px rgba(0, 0, 0, 0.9),
                 1px -1px 2px rgba(0, 0, 0, 0.9),
                 -1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* Style for purchase details text like (Fully Returned/Sold) */
.purchase-details-text {
    color: rgba(244, 228, 188, 0.7) !important;
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: none !important;
    margin-left: 0.5rem;
}

/* Magic Item type badge styling */
.type-magic-item {
    background: linear-gradient(45deg, #6f42c1, #4c6ef5) !important;
    color: white !important;
    border: 1px solid rgba(111, 66, 193, 0.3) !important;
    box-shadow: 0 0 8px rgba(111, 66, 193, 0.4);
    animation: magic-shimmer 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.type-magic-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: magic-shine 4s ease-in-out infinite;
}

@keyframes magic-shimmer {
    0%, 100% {
        box-shadow: 0 0 8px rgba(111, 66, 193, 0.4), 0 0 12px rgba(76, 110, 245, 0.2);
    }
    50% {
        box-shadow: 0 0 12px rgba(111, 66, 193, 0.6), 0 0 16px rgba(76, 110, 245, 0.4);
    }
}

@keyframes magic-shine {
    0% { transform: translateX(-200%) translateY(-200%) rotate(45deg); }
    50% { transform: translateX(-200%) translateY(-200%) rotate(45deg); }
    75% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Equipment type badge - subtle styling for contrast */
.type-equipment {
    background-color: #6c757d !important;
    color: white !important;
    border: 1px solid rgba(108, 117, 125, 0.3) !important;
}

/* Consistent sizing for action buttons in tables */
.btn-sm.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Quest Item type badge styling */
.type-quest-item {
    background: linear-gradient(45deg, #ffc107, #fd7e14, #dc3545) !important;
    color: white !important;
    border: 2px solid rgba(255, 193, 7, 0.6) !important;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.5);
    animation: quest-pulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.type-quest-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 300%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        rgba(255, 215, 0, 0.2),
        rgba(255, 255, 255, 0.15),
        transparent);
    transform: rotate(25deg);
    animation: quest-sweep 5s ease-in-out infinite;
}

.type-quest-item::after {
    content: '✦';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    animation: quest-sparkle 1.8s ease-in-out infinite alternate;
}

@keyframes quest-pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 193, 7, 0.5), 0 0 20px rgba(255, 126, 20, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8), 0 0 30px rgba(255, 126, 20, 0.5);
        transform: scale(1.02);
    }
}

@keyframes quest-sweep {
    0% { transform: translateX(-300%) translateY(-100%) rotate(25deg); }
    20% { transform: translateX(-300%) translateY(-100%) rotate(25deg); }
    40% { transform: translateX(200%) translateY(50%) rotate(25deg); }
    100% { transform: translateX(200%) translateY(50%) rotate(25deg); }
}

@keyframes quest-sparkle {
    0% {
        opacity: 0.6;
        transform: scale(0.8) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Merchant toast styling */
.merchant-toast {
    max-width: 350px;
    border: 2px solid #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.merchant-toast .toast-header {
    background: linear-gradient(45deg, #ffc107, #e0a800) !important;
    color: #1a1a1a !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.merchant-toast .toast-body {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    font-style: italic;
    font-weight: 500;
    padding: 1rem;
    border-radius: 0 0 6px 6px;
}

/* Gray-out styling for sold/returned items */
.purchase-item.sold-returned {
    opacity: 0.6;
    filter: grayscale(50%);
    transition: all 0.3s ease;
}

.purchase-item.sold-returned:hover {
    opacity: 0.8;
    filter: grayscale(30%);
    transform: translateX(2px); /* Less movement than active items */
}

.purchase-item.sold-returned .purchase-name {
    color: rgba(244, 228, 188, 0.5) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7),
                 -1px -1px 1px rgba(0, 0, 0, 0.7) !important;
}

.purchase-item.sold-returned .purchase-details small {
    color: rgba(244, 228, 188, 0.4) !important;
}

.purchase-item.sold-returned .purchase-details .text-warning {
    color: rgba(255, 193, 7, 0.5) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.purchase-item.sold-returned .purchase-details .text-success {
    color: rgba(40, 167, 69, 0.6) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* ========================================
   QUEST LOG STYLES - Modern Design
   ======================================== */

/* Quest Log Container */
.quest-log-container {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.quest-log-header {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 193, 7, 0.6);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
    backdrop-filter: blur(10px);
}

.quest-log-header h1 {
    font-family: 'Cinzel', serif;
    color: #ffc107;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.quest-log-header p {
    color: rgba(244, 228, 188, 0.9);
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

/* Quest Log Grid Layout */
.quest-log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Quest Log Card - Modern Shop Style */
.quest-log-card {
    background: rgba(20, 20, 30, 0.95);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.vote-btn {
    width: 32px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    font-size: 0.85rem;
}

.vote-btn:first-child {
    border-top-left-radius: 4px !important;
    border-top-right-radius: 4px !important;
}

.vote-btn:last-child {
    border-bottom-left-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.vote-btn.btn-success,
.vote-btn.btn-warning,
.vote-btn.btn-danger {
    font-weight: bold;
}

/* ========================================
   QUEST EVENT STYLES
   ======================================== */
