/* ========================================
   DUMBASSGAMES - UPGRADE MODAL LAYOUT IMPROVEMENTS
   Three cards side by side, no scrolling required
   ======================================== */

/* Enhanced Upgrade Modal */
.upgrade-modal {
    max-width: 1200px; /* Increased from 800px to fit all 3 cards */
    width: 95%; /* Responsive width */
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px; /* Add padding for better spacing */
}

/* Improved Upgrade Tiers Grid */
.upgrade-tiers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Always 3 columns */
    gap: 20px;
    margin: 30px 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced Tier Options */
.tier-option {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.05), rgba(0, 255, 255, 0.02));
    border: 2px solid rgba(0, 255, 0, 0.2);
    border-radius: 15px;
    padding: 20px; /* Slightly reduced for better fit */
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    margin: 0; /* Remove margins that cause overflow */
    min-height: 500px; /* Consistent height for all cards */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tier-option:hover {
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    transform: translateY(-5px);
}

/* Improved Badge Positioning */
.recommended-badge,
.current-plan-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 6px 10px;
    border-radius: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px; /* Slightly smaller for better fit */
    font-weight: bold;
    transform: rotate(15deg);
    animation: recommended-pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 10;
    white-space: nowrap;
}

.current-plan-badge {
    background: linear-gradient(45deg, #666666, #888888);
    color: #fff;
    transform: rotate(-15deg);
}

/* Optimized Tier Headers */
.tier-plan-header {
    margin-bottom: 20px; /* Reduced spacing */
    flex-shrink: 0;
}

.tier-badge-xl {
    font-size: 2.5rem; /* Slightly smaller for better fit */
    display: block;
    margin-bottom: 12px;
    text-shadow: 0 0 20px currentColor;
    animation: tier-glow 2s ease-in-out infinite alternate;
}

.tier-plan-header h4 {
    color: #00ff00;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px; /* Slightly smaller */
    margin: 8px 0;
    text-shadow: 0 0 10px #00ff00;
    line-height: 1.2;
}

.tier-price {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px; /* Reduced from 24px */
    color: #00ffff;
    margin: 12px 0;
    text-shadow: 0 0 15px #00ffff;
}

.tier-price span {
    font-size: 10px; /* Reduced from 12px */
    color: #888;
    text-shadow: none;
}

/* Improved Features Section */
.tier-features {
    text-align: left;
    margin: 15px 0;
    flex-grow: 1; /* Allow features to fill available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tier-features .feature {
    padding: 6px 0; /* Reduced padding */
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    color: #cccccc;
    font-size: 10px; /* Slightly smaller */
    display: flex;
    align-items: center;
    line-height: 1.3;
}

.tier-features .feature:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Optimized Buttons */
.btn-upgrade-tier,
.current-plan-status {
    background: linear-gradient(45deg, #00ff00, #00ffff);
    border: 2px solid #00ff00;
    color: #000;
    padding: 12px 20px; /* Reduced padding */
    border-radius: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px; /* Slightly smaller */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    width: 100%;
    margin-top: 15px; /* Reduced margin */
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
}

.btn-upgrade-tier:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 30px rgba(0, 255, 0, 0.6);
    background: linear-gradient(45deg, #00ffff, #00ff00);
}

.btn-upgrade-tier.recommended {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.btn-upgrade-tier.recommended:hover {
    box-shadow: 0 5px 30px rgba(255, 215, 0, 0.7);
    background: linear-gradient(45deg, #FFA500, #FFD700);
}

/* Current Plan Button Styling */
.current-plan-status {
    background: rgba(102, 102, 102, 0.2);
    border: 2px solid rgba(102, 102, 102, 0.4);
    color: #888888;
    cursor: default;
    box-shadow: none;
}

.current-plan-status:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   ENHANCED RESPONSIVE DESIGN
   Better scaling for different screen sizes
   ======================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .upgrade-modal {
        max-width: 1300px;
    }
    
    .upgrade-tiers {
        gap: 25px;
    }
    
    .tier-option {
        padding: 25px;
        min-height: 550px;
    }
    
    .tier-badge-xl {
        font-size: 3rem;
    }
    
    .tier-plan-header h4 {
        font-size: 16px;
    }
    
    .tier-price {
        font-size: 24px;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 10px;
        padding: 15px 25px;
    }
}

/* Standard Desktop (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .upgrade-modal {
        max-width: 1100px;
    }
    
    .upgrade-tiers {
        gap: 18px;
    }
    
    .tier-option {
        padding: 18px;
        min-height: 480px;
    }
    
    .tier-badge-xl {
        font-size: 2.3rem;
    }
    
    .tier-plan-header h4 {
        font-size: 13px;
    }
    
    .tier-price {
        font-size: 18px;
    }
}

/* Tablet Landscape (900px - 1023px) */
@media (max-width: 1023px) and (min-width: 900px) {
    .upgrade-modal {
        max-width: 95%;
        width: 95%;
    }
    
    .upgrade-tiers {
        gap: 15px;
        grid-template-columns: 1fr 1fr 1fr; /* Still keep 3 columns */
    }
    
    .tier-option {
        padding: 16px;
        min-height: 450px;
    }
    
    .tier-badge-xl {
        font-size: 2rem;
    }
    
    .tier-plan-header h4 {
        font-size: 12px;
    }
    
    .tier-price {
        font-size: 16px;
    }
    
    .tier-features .feature {
        font-size: 9px;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 8px;
        padding: 10px 15px;
    }
}

/* Tablet Portrait (768px - 899px) */
@media (max-width: 899px) and (min-width: 768px) {
    .upgrade-modal {
        max-width: 98%;
        width: 98%;
        padding: 15px;
    }
    
    .upgrade-tiers {
        gap: 12px;
        grid-template-columns: 1fr 1fr 1fr; /* Still 3 columns but tighter */
    }
    
    .tier-option {
        padding: 14px;
        min-height: 420px;
    }
    
    .tier-badge-xl {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .tier-plan-header h4 {
        font-size: 11px;
        margin: 6px 0;
    }
    
    .tier-price {
        font-size: 14px;
        margin: 8px 0;
    }
    
    .tier-price span {
        font-size: 8px;
    }
    
    .tier-features .feature {
        font-size: 8px;
        padding: 4px 0;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 7px;
        padding: 8px 12px;
        margin-top: 12px;
    }
    
    .recommended-badge,
    .current-plan-badge {
        font-size: 6px;
        padding: 4px 8px;
    }
}

/* Large Mobile (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .upgrade-modal {
        max-width: 100%;
        width: 100%;
        padding: 12px;
        margin: 10px;
    }
    
    .upgrade-tiers {
        gap: 10px;
        grid-template-columns: 1fr 1fr 1fr; /* Keep 3 columns even on mobile */
        margin: 20px 0;
    }
    
    .tier-option {
        padding: 12px;
        min-height: 400px;
        border-radius: 12px;
    }
    
    .tier-badge-xl {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .tier-plan-header {
        margin-bottom: 15px;
    }
    
    .tier-plan-header h4 {
        font-size: 10px;
        margin: 4px 0;
        line-height: 1.1;
    }
    
    .tier-price {
        font-size: 12px;
        margin: 6px 0;
    }
    
    .tier-price span {
        font-size: 7px;
    }
    
    .tier-features .feature {
        font-size: 7px;
        padding: 3px 0;
        line-height: 1.2;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 6px;
        padding: 8px 10px;
        margin-top: 10px;
        line-height: 1.1;
    }
    
    .recommended-badge,
    .current-plan-badge {
        font-size: 5px;
        padding: 3px 6px;
        top: -3px;
        right: -3px;
    }
}

/* Small Mobile (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    .upgrade-modal {
        max-width: 100%;
        width: 100%;
        padding: 10px;
        margin: 5px;
    }
    
    .upgrade-tiers {
        gap: 8px;
        grid-template-columns: 1fr 1fr 1fr; /* Still keep 3 columns */
        margin: 15px 0;
    }
    
    .tier-option {
        padding: 10px;
        min-height: 380px;
        border-radius: 10px;
    }
    
    .tier-badge-xl {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .tier-plan-header h4 {
        font-size: 9px;
        margin: 3px 0;
    }
    
    .tier-price {
        font-size: 11px;
        margin: 5px 0;
    }
    
    .tier-features .feature {
        font-size: 6px;
        padding: 2px 0;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 5px;
        padding: 6px 8px;
        margin-top: 8px;
    }
}

/* Extra Small Mobile (< 480px) - Last resort 2x2 + 1 layout */
@media (max-width: 479px) {
    .upgrade-modal {
        max-width: 100%;
        width: 100%;
        padding: 8px;
        margin: 0;
    }
    
    .upgrade-tiers {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 columns */
        gap: 8px;
        margin: 15px 0;
    }
    
    /* Make the third card (DEV) span full width */
    .tier-option[data-tier="DEV"] {
        grid-column: 1 / -1; /* Full width for recommended tier */
    }
    
    .tier-option {
        padding: 12px;
        min-height: 350px;
    }
    
    .tier-badge-xl {
        font-size: 1.2rem;
    }
    
    .tier-plan-header h4 {
        font-size: 8px;
    }
    
    .tier-price {
        font-size: 10px;
    }
    
    .tier-features .feature {
        font-size: 6px;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 5px;
        padding: 6px;
    }
}

/* ========================================
   FOOTER IMPROVEMENTS
   Better spacing and alignment
   ======================================== */

.upgrade-footer {
    text-align: center;
    margin-top: 25px; /* Reduced from 30px */
    padding: 15px 20px; /* Reduced padding */
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.upgrade-footer p {
    color: #888;
    font-size: 9px; /* Slightly smaller */
    margin: 3px 0; /* Reduced margin */
    line-height: 1.4;
}

/* ========================================
   ACCESSIBILITY AND PERFORMANCE
   Better user experience
   ======================================== */

/* Smooth scrolling for modal */
.upgrade-modal {
    scroll-behavior: smooth;
}

/* Improved focus states */
.btn-upgrade-tier:focus,
.current-plan-status:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tier-option {
        border-width: 3px;
    }
    
    .tier-option.recommended {
        border-color: #FFD700;
        background: rgba(255, 215, 0, 0.1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tier-option,
    .btn-upgrade-tier,
    .tier-badge-xl {
        transition: none;
        animation: none;
    }
    
    .tier-option:hover {
        transform: none;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   Better rendering and loading
   ======================================== */

.tier-option {
    will-change: transform;
    backface-visibility: hidden;
}

.upgrade-tiers {
    contain: layout style;
}

/* Ensure proper rendering */
.upgrade-modal * {
    box-sizing: border-box;
}

/* Override responsive breakpoints to maintain 3-column layout */
@media (max-width: 1024px) {
    .upgrade-modal {
        max-width: 95%;
        width: 95%;
    }
    
    .upgrade-tiers {
        grid-template-columns: 1fr 1fr 1fr; /* Keep 3 columns */
        gap: 15px;
    }
    
    .tier-option {
        padding: 18px;
        min-height: 480px;
    }
    
    .tier-badge-xl {
        font-size: 2.2rem;
    }
    
    .tier-plan-header h4 {
        font-size: 12px;
    }
    
    .tier-price {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .upgrade-modal {
        max-width: 98%;
        width: 98%;
        padding: 15px;
    }
    
    .upgrade-tiers {
        grid-template-columns: 1fr 1fr 1fr; /* Still 3 columns */
        gap: 12px;
    }
    
    .tier-option {
        padding: 15px;
        min-height: 420px;
    }
    
    .tier-badge-xl {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .tier-plan-header h4 {
        font-size: 10px;
        margin: 6px 0;
    }
    
    .tier-price {
        font-size: 14px;
        margin: 8px 0;
    }
    
    .tier-price span {
        font-size: 8px;
    }
    
    .tier-features .feature {
        font-size: 8px;
        padding: 4px 0;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 7px;
        padding: 8px 12px;
        margin-top: 12px;
    }
    
    .recommended-badge,
    .current-plan-badge {
        font-size: 6px;
        padding: 4px 8px;
    }
}

/* Small screens - keep 3 columns but make them very compact */
@media (max-width: 600px) {
    .upgrade-modal {
        max-width: 100%;
        width: 100%;
        padding: 10px;
    }
    
    .upgrade-tiers {
        grid-template-columns: 1fr 1fr 1fr; /* Still 3 columns */
        gap: 8px;
        margin: 15px 0;
    }
    
    .tier-option {
        padding: 12px;
        min-height: 380px;
        border-radius: 12px;
    }
    
    .tier-badge-xl {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    
    .tier-plan-header h4 {
        font-size: 9px;
        margin: 4px 0;
        line-height: 1.1;
    }
    
    .tier-price {
        font-size: 12px;
        margin: 6px 0;
    }
    
    .tier-price span {
        font-size: 7px;
    }
    
    .tier-features .feature {
        font-size: 7px;
        padding: 3px 0;
        line-height: 1.2;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 6px;
        padding: 6px 8px;
        margin-top: 8px;
        line-height: 1.1;
    }
    
    .recommended-badge,
    .current-plan-badge {
        font-size: 5px;
        padding: 3px 6px;
        top: -3px;
        right: -3px;
    }
}

/* Very small screens - last resort compact layout */
@media (max-width: 480px) {
    .upgrade-tiers {
        grid-template-columns: 1fr 1fr 1fr; /* Still try 3 columns */
        gap: 6px;
    }
    
    .tier-option {
        padding: 10px;
        min-height: 360px;
    }
    
    .tier-badge-xl {
        font-size: 1.2rem;
    }
    
    .tier-plan-header h4 {
        font-size: 8px;
    }
    
    .tier-price {
        font-size: 10px;
    }
    
    .tier-features .feature {
        font-size: 6px;
        padding: 2px 0;
    }
    
    .btn-upgrade-tier,
    .current-plan-status {
        font-size: 5px;
        padding: 6px;
    }
} 