* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #1a1a2e;
    color: #fff;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: #1a1a2e;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #7627C5, #1a1a2e);
    padding: 20px;
    text-align: center;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.silph {
    font-size: 12px;
    opacity: 0.8;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Tabs */
.tabs {
    background: #0d0d1a;
    padding: 12px;
}

.tab-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tab-row:last-child {
    margin-bottom: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px 4px;
    background: #7627C5;
    border: none;
    color: white;
    font-size: 13px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    display: block;
}

.tab-btn.active {
    background: #2196F3;
}

/* History Tab */
.history-section {
    background: #0d0d1a;
    border-radius: 16px;
    padding: 16px;
}

.history-search {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.history-search input {
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #2a2a3e;
    color: white;
}

.history-disclaimer {
    font-size: 11px;
    color: #FFA500;
    text-align: center;
    padding: 8px;
    background: #0d0d1a;
    border-radius: 8px;
    margin: 5px 0;
}

.search-history-btn {
    padding: 12px;
    background: #2196F3;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.history-title {
    font-size: 16px;
    font-weight: bold;
    margin: 16px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.order-history-item, .rsvp-history-item {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.order-history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-id {
    color: #FFA500;
    font-weight: bold;
    font-size: 12px;
}

.order-total {
    color: #4CAF50;
    font-weight: bold;
}

.order-details {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}

.order-status {
    font-size: 11px;
    font-weight: bold;
}

.status-paid { color: #4CAF50; }
.status-pending { color: #FFA500; }

.rsvp-event-name {
    font-weight: bold;
    font-size: 13px;
    color: #2196F3;
    cursor: pointer;
}

.rsvp-event-date {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

.empty-history {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Content */
.content {
    padding: 12px;
}

.tab-content {
    display: none;
}

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

/* Search & Filters */
.search-bar input {
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: none;
    background: #2a2a3e;
    color: white;
    font-size: 14px;
    margin-bottom: 12px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    background: #2a2a3e;
    border: none;
    color: white;
    border-radius: 25px;
    font-size: 12px;
    cursor: pointer;
}

.filter-chip.active {
    background: #7627C5;
}

/* Infographics Header */
.infographics-header {
    margin: 12px 12px 8px 12px;
}

.infographics-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.infographics-btn.view-all {
    background: #FF9800;
    color: white;
    margin-bottom: 10px;
}

.infographics-btn.weekly {
    background: #2196F3;
    color: white;
}

.infographics-btn.monthly {
    background: #4CAF50;
    color: white;
}

.infographics-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.infographics-row .infographics-btn {
    width: 50%;
    margin-bottom: 0;
}

.separator-line {
    height: 2px;
    background: linear-gradient(90deg, #FF9800, #7627C5, #FF9800);
    border-radius: 2px;
    margin: 8px 0 4px 0;
}

/* Gallery View (All Infographics) */
.gallery-modal {
    background: #1a1a2e;
}

.gallery-modal .modal-content {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
    background: #1a1a2e;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.gallery-item {
    background: #2a2a3e;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-item-name {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    word-break: break-all;
}

/* Fullscreen Viewer (Single Image) */
.viewer-modal {
    background: rgba(0,0,0,0.95);
}

.viewer-modal .modal-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    background: #000;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.viewer-modal .modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    padding: 12px 20px;
}

.viewer-modal .modal-header h2 {
    color: white;
    font-size: 16px;
    margin: 0;
}

.viewer-modal .modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    padding: 16px;
    justify-content: center;
}

.viewer-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.viewer-image {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
}

.viewer-nav {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    z-index: 10;
}

.viewer-nav-btn {
    background: #7627C5;
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.viewer-nav-btn:hover:not(:disabled) {
    background: #FF9800;
}

.viewer-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.viewer-counter {
    color: white;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
}

.back-btn {
    background: #FF9800;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* Debut Banner */
.debut-banner {
    background: linear-gradient(135deg, #2a1a3e, #1a1a2e);
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid #FFA500;
}

.debut-content {
    padding: 12px;
    text-align: center;
}

.debut-title {
    font-size: 14px;
    font-weight: bold;
    color: #FFA500;
    margin-bottom: 4px;
}

.debut-event-name {
    font-size: 16px;
    font-weight: bold;
    color: #03DAC5;
    margin-bottom: 4px;
}

.debut-countdown {
    font-size: 12px;
    color: #fff;
    margin-bottom: 12px;
}

.debut-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.debut-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.view-debuts {
    background: #7627C5;
    color: white;
}

.view-event {
    background: #2196F3;
    color: white;
}

/* Event Card with Image */
.event-card-with-img {
    background: #2a2a3e;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.event-card-with-img img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: white;
    padding: 4px;
    object-fit: contain;
}

.event-info {
    flex: 1;
}

.event-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    color: white;
}

.event-heading {
    font-size: 11px;
    color: #FFA500;
    margin-bottom: 4px;
}

.event-time {
    font-size: 10px;
    color: #aaa;
    line-height: 1.4;
}

.event-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-view-btn, .event-rsvp-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 11px;
    cursor: pointer;
}

.event-view-btn {
    background: #2196F3;
}

.event-rsvp-btn {
    background: #4CAF50;
}

.event-emoji {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #7627C5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

/* Pokémon Card */
.pokemon-card {
    background: #2a2a3e;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}

.pokemon-card:active {
    transform: scale(0.99);
}

.pokemon-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.pokemon-info {
    flex: 1;
}

.pokemon-name {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
}

.pokemon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.pokemon-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    display: inline-block;
}

.tag-regional {
    background: #2196F3;
    color: white;
}

.tag-great {
    background: #4CAF50;
    color: white;
}

.tag-ultra {
    background: #FF9800;
    color: white;
}

.tag-master {
    background: #9C27B0;
    color: white;
}

.tag-premier {
    background: #E91E63;
    color: white;
}

.tag-ultra-premier {
    background: #00BCD4;
    color: white;
}

.pokemon-details {
    font-size: 11px;
    color: #aaa;
}

.pokemon-details {
    color: #FFD700;
    font-weight: bold;
}

.shiny-rate {
    color: #FFD700;
    font-weight: bold;
}

.spawn-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    display: inline-block;
}

.badge-heavy { background: #F44336; }
.badge-medium { background: #FF9800; }
.badge-low { background: #4CAF50; }
.badge-minimal { background: #2196F3; }
.badge-nope { background: #757575; }

.order-btn {
    background: #4CAF50;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

/* Raid Card */
.raid-header {
    background: #0d0d1a;
    padding: 10px 12px;
    margin: 16px 0 8px 0;
    border-left: 4px solid #FFC107;
}

.raid-header h4 {
    color: #FFC107;
    font-size: 13px;
    font-weight: bold;
    margin: 0;
}

.raids-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.raid-card {
    background: #2a2a3e;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    width: 85px;
    cursor: pointer;
    transition: transform 0.1s;
    position: relative;
}

.raid-card:active {
    transform: scale(0.98);
}

.raid-card img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.raid-card span {
    font-size: 11px;
    display: block;
    margin-top: 5px;
}

.raid-image-container {
    position: relative;
    width: 55px;
    height: 55px;
    margin: 0 auto;
}

.raid-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shadow-underlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(68, 0, 68, 0.6) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.dynamax-underlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 0, 0, 0.4) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Cart Section */
.cart-section, .coins-section, .other-requests-section {
    background: #0d0d1a;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
    margin-bottom: 12px;
    font-weight: bold;
}

.cart-item {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

.cart-item-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cart-item-name {
    font-size: 13px;
    font-weight: bold;
}

.cart-item-price {
    color: #4CAF50;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    border: none;
    background: #7627C5;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.delete-btn {
    background: #F44336;
    border: none;
    padding: 4px 10px;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-size: 11px;
}

.cart-total {
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.empty-cart {
    text-align: center;
    padding: 20px;
    color: #888;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.section-title {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 14px;
}

.coin-buttons {
    display: flex;
    gap: 10px;
}

.coin-btn {
    flex: 1;
    padding: 12px;
    background: #7627C5;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
}

.other-requests-section textarea {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #2a2a3e;
    color: white;
    font-family: inherit;
    resize: vertical;
}

/* Contact Section */
.contact-section {
    background: #0d0d1a;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.contact-section h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.admin-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.admin-btn {
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    display: block;
}

.admin-btn.dan {
    background: #4CAF50;
}

.admin-btn.thomas {
    background: #FF9800;
}

.admin-btn.kingi {
    background: #2196F3;
    opacity: 0.6;
}

.admin-btn.kingi.disabled {
    cursor: not-allowed;
}

.facebook-info {
    font-size: 11px;
    color: #aaa;
    margin-top: 12px;
    text-align: center;
}

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

.modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #333;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    padding: 16px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #333;
}

/* Order Dialog */
.order-stats {
    background: #0d0d1a;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

.order-section {
    background: #0d0d1a;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-num {
    font-size: 18px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.item-price {
    margin-left: auto;
    color: #4CAF50;
    font-weight: bold;
}

.raid-packs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.pack-btn {
    padding: 8px 12px;
    background: #7627C5;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

.admin-option {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.admin-option.dan { background: #4CAF50; }
.admin-option.kingi { background: #2196F3; }
.admin-option.thomas { background: #FF9800; }

.payment-option {
    background: #0d0d1a;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
}

.payment-link {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 20px;
    background: #0070BA;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
}

.copy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0;
}

.payment-username {
    font-size: 18px;
    font-weight: bold;
    background: #2a2a3e;
    padding: 8px 16px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: #2196F3;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.copy-btn:hover {
    background: #0b5e7e;
}

.rsvp-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: none;
    background: #2a2a3e;
    color: white;
}

.disclaimer {
    font-size: 10px;
    color: #FFA500;
    text-align: center;
    margin-top: 12px;
}

.cancel-btn, .confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.cancel-btn { background: #F44336; }
.confirm-btn { background: #4CAF50; }

.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading-modal {
    text-align: center;
    background: #1a1a2e;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #7627C5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
