/* Hidden elements - replacing inline styles */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.visible.inline {
    display: inline !important;
}

.visible.flex {
    display: flex !important;
}

.visible.grid {
    display: grid !important;
}

/* Network Status Indicators */
.status-text.status-loading {
    color: #ff9500;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-text.status-success {
    color: #4CAF50;
}

.status-text.status-warning {
    color: #ff9500;
}

.status-text.status-error {
    color: #f44336;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.bonus-pool-text {
    display: block;
    font-size: 0.7em;
    color: #a0a0a0;
    margin-top: 2px;
}

.error-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 10000;
    max-width: 400px;
    text-align: center;
}

.error-reload-btn {
    margin-top: 10px;
    padding: 5px 10px;
    background: white;
    color: #dc3545;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Basic reset and styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn.connected {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn.connected:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.2);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Top Connection Banner */
.top-connection-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: relative;
    z-index: 90;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.banner-icon {
    color: #fff;
    font-size: 1.5rem;
}

.banner-text {
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
}

.banner-connect-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-connect-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-connect-btn i {
    font-size: 0.9rem;
}

/* Hide banner when connected */
.top-connection-banner.hidden {
    display: none;
}

@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .banner-text {
        text-align: center;
        font-size: 1rem;
    }
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Lottery Ticket Interface */
.lottery-ticket-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    color: #1f2937;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.lottery-ticket-form {
    display: block;
}

.lottery-ticket-form.hidden {
    display: none;
}

.ticket-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    padding-bottom: 1rem;
}

.ticket-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.ticket-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.quick-pick-options {
    display: flex;
    justify-content: center;
}

.quick-pick-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-pick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.play-sections {
    margin-bottom: 2rem;
}

.play-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    background: rgba(102, 126, 234, 0.02);
}

.play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.play-label {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.play-instructions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.instruction-text {
    color: #6b7280;
    font-size: 0.9rem;
}

.quick-pick-single,
.quick-pick-ultra {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-pick-single:hover,
.quick-pick-ultra:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.ultra-ball-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.ultra-ball-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ultra-ball-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.ultra-ball-instructions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.add-play-section {
    text-align: center;
    margin-top: 1rem;
}

.add-play-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.add-play-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.purchase-ticket-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.purchase-ticket-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.purchase-ticket-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.purchase-section {
    margin-top: 2rem;
}

.purchase-form {
    margin-top: 1.5rem;
}

.connection-status-inline {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(103, 126, 234, 0.1);
    border: 2px solid rgba(103, 126, 234, 0.2);
}

.connection-status-inline .status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.connection-status-inline .status-icon {
    font-size: 2rem;
    color: #667eea;
}

.connection-status-inline .status-text h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.connection-status-inline .status-text p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
}

.pot-display {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    color: #1f2937;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pot-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pot-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pot-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-top: 0.5rem;
}

.pot-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
}

/* Quick Info Bar */
.quick-info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.progressive-pricing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Current Pricing Display */
.current-pricing-display {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 700px;
    color: #1f2937;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.current-pricing-display h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pricing-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .pricing-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 380px) {
    .pricing-grid-compact {
        grid-template-columns: 1fr;
    }
}

.price-item {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.pricing-grid-compact .price-item {
    padding: 1rem;
}

/* Tier-based color variations */
.price-item.tier-info.tier-1 {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.15);
}

.price-item.tier-info.tier-1 .price-value {
    color: #667eea;
}

.price-item.tier-info.tier-2 {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.15);
}

.price-item.tier-info.tier-2 .price-value {
    color: #22c55e;
}

.price-item.tier-info.tier-3 {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.15);
}

.price-item.tier-info.tier-3 .price-value {
    color: #fbbf24;
}

.price-item.tier-info.tier-4 {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.15);
}

.price-item.tier-info.tier-4 .price-value {
    color: #ef4444;
}

.price-item.tier-info.tier-max {
    border-color: rgba(168, 85, 247, 0.6);
    background: rgba(168, 85, 247, 0.15);
}

.price-item.tier-info.tier-max .price-value {
    color: #a855f7;
}

.price-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tier-info .price-value {
    color: #667eea;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tier-info .price-label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Tier Progress Item Styling */
.price-item.tier-progress-item {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tier-progress-item .price-label {
    color: rgba(255, 255, 255, 0.9);
}

.tier-progress-item .price-value {
    color: #ffffff;
}

/* Tier Progress Bar */
.tier-progress {
    margin-top: 1rem;
}

.tier-progress-bar {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.tier-progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.tier-progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Enhanced Purchase Summary */
.purchase-summary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.summary-item.total-cost {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    padding-top: 0.75rem;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
}

.summary-item.total-cost span:last-child {
    color: #f1c40f;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pricing-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pricing-note i {
    color: #f1c40f;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Rules CTA Section */
.rules-cta {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: #1f2937;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.rules-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.rules-cta p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Ticket Purchase Section */
.ticket-section {
    display: none;
}

.ticket-section.active {
    display: block;
}

.ticket-purchase-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #374151;
}

.form-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.ticket-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #f3f4f6;
    border-color: #667eea;
}

#ticketQuantity {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.ultra-ball-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Main lottery numbers grid (1-69) */
.main-numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.main-number {
    aspect-ratio: 1;
    border: 2px solid #d1d5db;
    background: linear-gradient(145deg, #ffffff 0%, #f3f4f6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #374151;
    min-height: 35px;
}

.main-number:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.main-number.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

/* Ultra Ball numbers grid (1-20) */
.ultra-ball-numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.3rem;
    margin-bottom: 1rem;
    max-width: 100%;
}

.ultra-ball-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Compact version for inline purchase form */
.purchase-interface .ultra-ball-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    max-width: 600px;
    margin: 0 auto 1rem auto;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .purchase-interface .ultra-ball-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.3rem;
        max-width: 500px;
    }
}

/* Alternative class name for number grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hide the number input when we have the beautiful ball grid */
.number-input-container .number-input {
    display: none !important;
}

/* Make sure the grid is visible */
.number-grid {
    display: grid !important;
    visibility: visible !important;
}

.ultra-ball-number {
    aspect-ratio: 1;
    border: 2px solid #d1d5db;
    background: linear-gradient(145deg, #ffffff 0%, #f3f4f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #374151;
    min-height: 35px;
}

.ultra-ball-number:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.ultra-ball-number.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

/* Ultra Ball options (created by JavaScript) */
.ultra-ball-option {
    aspect-ratio: 1;
    border: 2px solid #d1d5db;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ultra-ball-option:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.ultra-ball-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.selection-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.auto-random-option {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-weight: 500;
    gap: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.auto-random-option small {
    display: block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

#referralCode {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.purchase-summary {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.summary-item:last-child {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 1.125rem;
    color: #667eea;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding-top: 0.5rem;
}

/* Dashboard */
.dashboard {
    margin-bottom: 4rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.ticket-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.referral-code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.ticket-list {
    max-height: 300px;
    overflow-y: auto;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.ticket-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.ultra-ball-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Winners Section */
.winners-list {
    max-width: 800px;
    margin: 0 auto;
}

.winner-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.winner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.winner-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.winner-details h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.winner-details p {
    color: #6b7280;
    font-size: 0.875rem;
}

.winner-prize {
    text-align: right;
}

.prize-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.winning-number {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Rules Section */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.rule-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.rule-card:hover {
    transform: translateY(-5px);
}

.rule-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.rule-icon i {
    font-size: 2rem;
    color: white;
}

.rule-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.rule-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.transaction-status {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .pot-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Improve ultra ball grid on mobile */
    .ultra-ball-grid,
    .ultra-ball-numbers-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.4rem;
        max-width: 100%;
    }
    
    /* Improve main numbers grid on mobile */
    .main-numbers-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.3rem;
    }
    
    /* Make number buttons larger on mobile */
    .main-number,
    .ultra-ball-number {
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    /* Fix pricing grid on mobile */
    .pricing-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    /* Purchase interface adjustments */
    .purchase-interface {
        padding: 1.5rem 1rem;
        margin: 1rem;
    }
    
    .selection-options {
        flex-direction: column;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-actions {
        order: -1;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Banner improvements */
    .banner-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .banner-text {
        text-align: center;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .pot-value {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .ticket-purchase-card,
    .dashboard-card {
        padding: 1.5rem;
    }
    
    /* Ultra compact grids for very small screens */
    .ultra-ball-grid,
    .ultra-ball-numbers-grid,
    .main-numbers-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 0.25rem;
    }
    
    .main-number,
    .ultra-ball-number {
        min-height: 35px;
        font-size: 0.8rem;
    }
    
    /* Single column pricing on very small screens */
    .pricing-grid-compact {
        grid-template-columns: 1fr;
    }
    
    /* Purchase interface for tiny screens */
    .purchase-interface {
        padding: 1rem 0.5rem;
        margin: 0.5rem;
        border-radius: 15px;
    }
}

/* Referral System Styles */
.referral-section {
    margin: 1.5rem 0;
}

.referral-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.referral-input-container .text-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.referral-input-container .text-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.referral-input-container .text-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.referral-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    display: none;
}

.referral-status.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #10b981;
    display: block;
}

.referral-status.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    display: block;
}

.referral-status.info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
    display: block;
}

/* Referral Dashboard */
.referral-dashboard {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-dashboard h2 {
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.referral-dashboard h2 i {
    margin-right: 0.5rem;
    color: #f1c40f;
}

.referral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.referral-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.referral-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.referral-card-header {
    margin-bottom: 1.5rem;
}

.referral-card-header h3 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.referral-card-header h3 i {
    margin-right: 0.5rem;
    color: #f1c40f;
}

.referral-card-content {
    color: rgba(255, 255, 255, 0.9);
}

.referral-url-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.referral-url-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.qr-code-container {
    text-align: center;
    margin-top: 1rem;
}

.qr-code {
    border: 4px solid white;
    border-radius: 8px;
    background: white;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-weight: 500;
    color: #667eea;
}

.stat-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.referral-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referral-info-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.referral-info-list li i {
    color: #10b981;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .referral-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-url-container {
        flex-direction: column;
    }
    
    .referral-card {
        padding: 1rem;
    }
}    .hero-title {
        font-size: 2rem;
    }
    
    .pot-value {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .ticket-purchase-card,
    .dashboard-card {
        padding: 1.5rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* NFT Rewards Section */
.nft-rewards-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(20px);
}

.nft-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.nft-rewards-card, .nft-info-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nft-rewards-header, .nft-info-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.reward-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.balance-label {
    color: rgba(255, 255, 255, 0.8);
}

.balance-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nft-info div {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.distribution-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    margin-top: 1rem;
}

.distribution-status.due {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.distribution-status.pending {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Admin Panel */
.admin-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary-color);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-info-card, .proposals-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-info-header, .proposals-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.admin-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.admin-info div {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.proposal-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.proposal-id {
    font-weight: bold;
    color: var(--primary-color);
}

.proposal-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.proposal-details {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.proposal-details div {
    margin-bottom: 0.25rem;
}

.proposal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.proposal-actions button {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.no-proposals {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 2rem;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .nft-rewards-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .proposal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .proposal-actions {
        flex-direction: column;
    }
}

/* Ticket Receipt Modal Styles */
.ticket-receipt {
    max-width: 500px;
    margin: 0 auto;
}

.receipt-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.receipt-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
}

.receipt-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.receipt-header h4 {
    color: var(--primary-color);
    margin: 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.receipt-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.receipt-details {
    margin: 1.5rem 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.detail-value {
    color: white;
    font-weight: 600;
    text-align: right;
}

.receipt-hash {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-width: 150px;
    word-break: break-all;
    cursor: pointer;
    color: var(--primary-color) !important;
}

.receipt-hash:hover {
    text-decoration: underline;
}

.receipt-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(255, 255, 255, 0.3);
}

.good-luck {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.good-luck i {
    color: #FFD700;
    animation: sparkle 2s ease-in-out infinite;
}

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

.receipt-qr {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.receipt-qr canvas {
    border-radius: 10px;
    background: white;
    padding: 0.5rem;
}

/* Enhanced Modal Footer for Receipt */
.ticket-receipt .modal-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ticket-receipt .modal-footer .btn {
    min-width: 120px;
    font-size: 0.9rem;
}

/* Ultra Ball Numbers Display in Receipt */
.receipt-ultra-ball-numbers {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 200px;
}

.receipt-ultra-ball-number {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Mobile responsiveness for receipt */
@media (max-width: 600px) {
    .ticket-receipt {
        max-width: 95vw;
        margin: 0;
    }
    
    .receipt-content {
        padding: 1rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .receipt-ultra-ball-numbers {
        justify-content: flex-start;
        max-width: 100%;
    }
    
    .ticket-receipt .modal-footer {
        flex-direction: column;
    }
    
    .ticket-receipt .modal-footer .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Lottery Ticket Styles - Based on Real Powerball Ticket */
.lottery-ticket-container {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #e0e0e0;
    font-family: 'Arial', sans-serif;
    max-width: 800px;
    margin: 0 auto;
}

.lottery-ticket-form {
    padding: 0;
}

/* Ticket Header */
.ticket-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 13px 13px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #c0392b;
}

.ticket-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ticket-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: -0.5rem;
}

.quick-pick-options {
    display: flex;
    gap: 0.5rem;
}

.quick-pick-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.quick-pick-btn:hover {
    background: white;
    color: #ee5a24;
}

/* Play Sections */
.play-sections {
    padding: 1.5rem;
}

.play-section {
    border: 2px solid #3498db;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    overflow: hidden;
}

.play-section.active {
    border-color: #2980b9;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.play-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.play-label {
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.play-instructions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.instruction-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-pick-single,
.quick-pick-ultra {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.quick-pick-single:hover,
.quick-pick-ultra:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Main Numbers Grid */
.main-numbers-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 3px;
    padding: 1rem;
    background: #f8f9fa;
}

.main-number {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    min-height: 35px;
}

.main-number:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
}

.main-number.selected {
    background: #2196f3;
    border-color: #1976d2;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* Ultra Ball Section */
.ultra-ball-section {
    margin-top: 1rem;
    border-top: 2px dashed #dee2e6;
    background: #fff3cd;
}

.ultra-ball-header {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: #333;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ultra-ball-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.ultra-ball-instructions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ultra-ball-instructions .instruction-text {
    color: #333;
    font-weight: 600;
}

.ultra-ball-numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    padding: 1rem;
    background: #fff3cd;
}

.ultra-ball-number {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    min-height: 35px;
}

.ultra-ball-number:hover {
    background: #fff9c4;
    border-color: #ff8f00;
    transform: translateY(-1px);
}

.ultra-ball-number.selected {
    background: #ff8f00;
    border-color: #ef6c00;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 143, 0, 0.4);
}

/* Add Play Section */
.add-play-section {
    text-align: center;
    margin-top: 1rem;
}

.add-play-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.add-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Ticket Options */
.ticket-options {
    background: #f8f9fa;
    padding: 1.5rem;
    border-top: 2px dashed #dee2e6;
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.option-label input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #ee5a24;
}

.option-text {
    color: #333;
}

/* Referral Section */
.referral-section {
    margin-top: 1rem;
}

.referral-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.referral-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.referral-input {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.referral-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.scan-qr-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scan-qr-btn:hover {
    background: #5a6268;
}

/* Ticket Summary */
.ticket-summary {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total-row {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ee5a24;
    border-top: 2px solid #dee2e6;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.summary-label {
    color: #333;
}

.summary-value {
    color: #333;
    font-weight: 600;
}

/* Purchase Button */
.purchase-section {
    padding: 1.5rem;
    text-align: center;
    background: #f8f9fa;
    border-top: 2px dashed #dee2e6;
}

.purchase-ticket-btn {
    background: linear-gradient(135deg, #ee5a24, #c0392b);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.purchase-ticket-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
}

.purchase-ticket-btn:active {
    transform: translateY(-1px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .lottery-ticket-container {
        margin: 0 0.5rem;
        max-width: none;
    }
    
    .ticket-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .main-numbers-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 2px;
        padding: 0.5rem;
    }
    
    .ultra-ball-numbers-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 3px;
        padding: 0.5rem;
    }
    
    .main-number,
    .ultra-ball-number {
        font-size: 0.8rem;
        min-height: 30px;
    }
    
    .play-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .play-instructions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ultra-ball-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .ultra-ball-instructions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ticket-summary {
        margin: 1rem;
    }
    
    .purchase-ticket-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* === RAFFLE INTERFACE STYLES === */

/* Ticket Purchase Interface */
.ticket-purchase-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 24px 0;
    color: #374151; /* Ensure dark text on white background */
}

.ticket-header {
    text-align: center;
    margin-bottom: 24px;
}

.ticket-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 8px;
}

.ticket-title i {
    font-size: 2rem;
    color: #f59e0b;
}

.ticket-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Ticket Quantity Selection */
.ticket-quantity-section {
    margin-bottom: 32px;
}

.section-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #2563eb;
    background: white;
    color: #2563eb;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #2563eb;
    color: white;
}

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

#ticketQuantity {
    width: 80px;
    height: 48px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
}

.quantity-note {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Ultra Ball Bonus Section */
.ultra-ball-bonus-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
}

.bonus-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 8px;
}

.ultra-ball-toggle {
    margin: 16px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

input[type="checkbox"]:checked + .toggle-switch {
    background: #2563eb;
}

input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(24px);
}

input[type="checkbox"] {
    display: none;
}

/* Ultra Ball Grid */
.ultra-ball-selection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d1d5db;
}

.ultra-ball-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 16px 0;
    max-width: 500px;
}

.ultra-ball-number {
    width: 36px;
    height: 36px;
    border: 2px solid #d1d5db;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.ultra-ball-number:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

.ultra-ball-number.selected {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.selection-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    padding: 8px 16px;
    border: 2px solid #6b7280;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #6b7280;
    color: white;
}

/* Purchase Section */
.purchase-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f3f4f6;
}

.cost-breakdown {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cost-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
}

.cost-line:last-child {
    margin-bottom: 0;
}

.total-cost {
    border-top: 1px solid #d1d5db;
    padding-top: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

.cost-amount {
    font-weight: bold;
    color: #2563eb;
}

.play-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.play-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.play-note {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Raffle Interface Responsive */
@media (max-width: 768px) {
    .ultra-ball-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .ultra-ball-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .quantity-controls {
        gap: 12px;
    }
    
    .qty-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    #ticketQuantity {
        width: 60px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Referral Rewards Section */
.rewards-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
}

.rewards-panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    max-width: 800px;
    margin: 0 auto;
}

.rewards-panel h3 {
    color: #1a202c;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
}

.rewards-panel h3 i {
    color: #f59e0b;
}

.rewards-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.rewards-info {
    flex: 1;
}

.reward-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.reward-stat:last-child {
    border-bottom: none;
}

.reward-label {
    font-weight: 500;
    color: #475569;
}

.reward-value {
    font-weight: 600;
    color: #1a202c;
    font-size: 1.1rem;
}

.rewards-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 140px;
}

/* Referral Sharing Section */
.referral-sharing {
    margin-bottom: 1.5rem;
}

.referral-sharing h4 {
    color: #1a202c;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.referral-sharing h4 i {
    color: #06d6a0;
}

.sharing-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.referral-link-container {
    margin-bottom: 1.5rem;
}

.referral-link-container label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.link-input-group {
    display: flex;
    gap: 0.5rem;
}

.referral-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8fafc;
    color: #374151;
    min-width: 0; /* Allows input to shrink */
}

.referral-link-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.sharing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.rewards-explainer {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.rewards-explainer small {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive rewards section */
@media (max-width: 768px) {
    .rewards-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .rewards-actions {
        width: 100%;
        min-width: auto;
    }
    
    .rewards-panel {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .link-input-group {
        flex-direction: column;
    }
    
    .sharing-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.5rem;
        background: white;
        border-radius: 6px;
    }
}
