/* Grab Bags - Shared Styles */

/* Container Styles */
.grabbags-container,
.my-grabbags-container,
.history-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.my-grabbags-container {
    max-width: 1200px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header p {
    font-size: 18px;
    color: #64748b;
}

/* Shipping Info Banner */
.shipping-info-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.shipping-info-banner i {
    font-size: 24px;
}

/* Status Banner (Early Bird) */
.status-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.status-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.status-content i {
    font-size: 32px;
}

/* Tier Badges */
.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-left: 8px;
}

.tier-badge.tier-0 {
    background: #94a3b8;
    color: white;
}

.tier-badge.tier-1 {
    background: #10b981;
    color: white;
}

.tier-badge.tier-2 {
    background: #3b82f6;
    color: white;
}

.tier-badge.tier-3 {
    background: #8b5cf6;
    color: white;
}

.tier-badge.tier-4 {
    background: #f59e0b;
    color: white;
}

.tier-badge.tier-5 {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
    font-weight: 700;
}

/* Message Panels */
.message-panel {
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.message-panel i {
    font-size: 48px;
}

.message-panel.warning {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #f59e0b;
}

.message-panel.info {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.message-panel h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.message-panel p {
    margin: 0;
}

.message-panel a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Grab Bags Grid */
.grabbags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Grab Bag Card */
.grabbag-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grabbag-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

.grabbag-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.grabbag-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tier-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
}

.grabbag-content {
    padding: 24px;
}

.grabbag-content h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.description {
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.6;
}

.tier-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4338ca;
}

.tier-requirement i {
    font-size: 16px;
    color: #6366f1;
}

.tier-requirement strong {
    color: #312e81;
}

.grabbag-stats {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #475569;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat i {
    color: #667eea;
}

.claims-info {
    background: #e0e7ff;
    color: #3730a3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
}

.btn-claim {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-claim:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-claim:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    color: #94a3b8;
}

/* Lootbox Modal Styles */
.lootbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.lootbox-modal.active {
    display: block;
}

.lootbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lootbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lootbox-animation {
    position: relative;
    width: 400px;
    height: 400px;
}

.treasure-chest {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.chest-body {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 140px;
    background: linear-gradient(135deg, #c7933d 0%, #8b6825 100%);
    border-radius: 12px;
    border: 4px solid #5d4419;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3),
                inset 0 -4px 8px rgba(0, 0, 0, 0.2);
}

.chest-lid {
    position: absolute;
    top: 20px;
    width: 200px;
    height: 80px;
    background: linear-gradient(135deg, #c7933d 0%, #8b6825 100%);
    border-radius: 12px 12px 0 0;
    border: 4px solid #5d4419;
    border-bottom: none;
    transform-origin: bottom;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
}

.treasure-chest.opening .chest-lid {
    transform: rotateX(-120deg);
}

.chest-lock {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 8px;
    border: 3px solid #b8860b;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.chest-lock::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #5d4419;
    border-radius: 50%;
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lootbox-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lootbox-result.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.result-card {
    background: white;
    padding: 50px 60px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 400px;
}

.result-icon {
    font-size: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.result-card h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.result-card h3 {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 20px 0;
}

.result-card p {
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-close-modal {
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Particle Animation */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffd700, #ff8c00);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 2s ease-out forwards;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Stats Grid (My Grab Bags) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Claims Section */
.claims-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.claims-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 30px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.claim-card {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.claim-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.claim-card:last-child {
    margin-bottom: 0;
}

.claim-image-container {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.claim-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.claim-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.claim-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.claim-status-badge.shipped {
    background: #d1fae5;
    color: #065f46;
}

.claim-content {
    padding: 24px;
}

.claim-content h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.claim-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
}

.detail-item i {
    color: #667eea;
}

/* CTA Panel */
.cta-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.cta-content i {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.cta-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.cta-content p {
    font-size: 16px;
    margin: 0 0 24px 0;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 14px 32px;
    background: white;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

/* Filter Section (History) */
.filter-section {
    margin-bottom: 30px;
}

.filter-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label i {
    color: #667eea;
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Stats Summary (History) */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.summary-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* History Card */
.history-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

.history-card.ended {
    opacity: 0.85;
}

.history-card .status-banner {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    border-radius: 0;
}

.history-card .status-banner.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.history-card .status-banner.upcoming {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.history-card .status-banner.ended {
    background: #94a3b8;
    color: white;
}

.history-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.history-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visibility-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.history-content {
    padding: 24px;
}

.history-content h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.history-stats {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stat-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #475569;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row i {
    color: #667eea;
    font-size: 16px;
    margin-top: 2px;
}

.btn-view {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.btn-view.ended {
    background: #cbd5e1;
    color: #64748b;
    cursor: default;
}

.btn-view.ended:hover {
    transform: none;
    box-shadow: none;
}

/* Guest CTA Panel */
.guest-cta-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.guest-cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.guest-cta-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.guest-cta-panel h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}

.guest-cta-sub {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.guest-value-props {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.value-prop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.value-prop i {
    font-size: 1.1rem;
}

.guest-cta-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mini-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.mini-num {
    width: 28px;
    height: 28px;
    background: white;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.mini-step span:last-child {
    font-size: 0.9rem;
    font-weight: 500;
}

.mini-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.guest-cta-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.guest-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: #667eea;
}

.guest-cta-login {
    margin: 1.25rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.guest-cta-login a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

.guest-cta-login a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .grabbags-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        min-width: 90%;
        padding: 40px 30px;
    }

    .treasure-chest {
        transform: translate(-50%, -50%) scale(0.7);
    }

    .claim-card {
        grid-template-columns: 1fr;
    }

    .claim-image-container {
        height: 250px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-card {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}
