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

body {
    font-family: 'Amazon Ember', Arial, sans-serif;
    background: #eaeded;
    overflow-x: hidden;
}

/* Start Screen */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #232F3E 0%, #131A22 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.start-content {
    background: white;
    border-radius: 12px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.start-logo h1 {
    font-size: 3rem;
    color: #FF9900;
    font-weight: bold;
    margin-bottom: 5px;
}

.start-subtitle {
    color: #232F3E;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.start-emoji {
    font-size: 4rem;
    margin: 20px 0;
}

.start-title {
    font-size: 2rem;
    color: #232F3E;
    margin-bottom: 15px;
}

.start-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: left;
}

.instructions h3 {
    color: #232F3E;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    padding: 8px 0;
    color: #333;
    font-size: 0.95rem;
}

.start-button {
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #111;
}

.start-button:hover {
    background: linear-gradient(to bottom, #f5d78e, #edb932);
    transform: scale(1.05);
}

/* Amazon Header */
.amazon-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #131921;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.header-main {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: baseline;
    cursor: pointer;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.logo-domain {
    font-size: 0.9rem;
    color: white;
}

.header-search {
    flex: 1;
    display: flex;
    max-width: 800px;
}

.search-category {
    padding: 8px 10px;
    border: none;
    background: #f3f3f3;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    color: #555;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 1rem;
}

.search-button {
    padding: 0 20px;
    background: #febd69;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: #f3a847;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-line1 {
    font-size: 0.75rem;
}

.nav-line2 {
    font-size: 0.9rem;
    font-weight: bold;
}

.nav-cart {
    position: relative;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-count {
    color: #f08804;
    font-weight: bold;
}

/* Game Stats Bar */
.game-stats-bar {
    background: #232F3E;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.9rem;
}

.stats-left, .stats-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-item {
    color: #ddd;
}

.stat-item strong {
    color: #FF9900;
    margin-left: 5px;
}

.stats-center {
    color: #FFD814;
    font-size: 1rem;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #cc0c39;
    padding: 6px 15px;
    border-radius: 4px;
}

.timer-label {
    font-weight: 600;
}

.timer-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.timer-display.warning {
    animation: pulse 0.5s infinite;
}

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

/* Black Friday Banner */
.bf-banner {
    margin-top: 110px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bf-content {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.bf-icon {
    font-size: 1.5rem;
    margin: 0 10px;
}

/* Target Items Panel */
.targets-panel {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.targets-container {
    max-width: 1500px;
    margin: 0 auto;
}

.targets-title {
    font-size: 1.1rem;
    color: #0F1111;
    margin-bottom: 15px;
    font-weight: 700;
}

#targetLevelDisplay {
    color: #FF9900;
}

.targets-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.target-item {
    background: linear-gradient(to bottom, #fff8dc, #fffacd);
    border: 2px solid #FF9900;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.target-item.found {
    opacity: 0.5;
    border-color: #067D62;
    background: linear-gradient(to bottom, #e8f5e9, #c8e6c9);
}

.target-product-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 4px;
    padding: 4px;
}

.target-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0F1111;
    max-width: 200px;
}

.found-check {
    color: #067D62;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Main Content */
.main-content {
    padding: 20px;
    padding-bottom: 100px;
    min-height: 200vh;
}

.content-container {
    max-width: 1500px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.8rem;
    color: #0F1111;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.product-card.clicked-correct {
    animation: success-flash 0.6s;
    pointer-events: none;
}

.product-card.clicked-wrong {
    animation: error-shake 0.5s;
}

@keyframes success-flash {
    0%, 100% { transform: scale(1); background: white; }
    50% { transform: scale(1.05); background: #4caf50; }
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #CC0C39;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

.product-image-container {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f8f8f8;
    border-radius: 4px;
    padding: 10px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 0.95rem;
    color: #0F1111;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-stars {
    color: #FF9900;
    font-size: 0.9rem;
}

.rating-count {
    color: #007185;
    font-size: 0.85rem;
}

.product-price-section {
    margin-top: auto;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 400;
    color: #B12704;
    margin-bottom: 5px;
}

.price-symbol {
    font-size: 0.8rem;
    vertical-align: super;
    margin-right: 2px;
}

.price-whole {
    font-size: 1.8rem;
}

.price-decimal {
    font-size: 0.8rem;
    vertical-align: super;
}

.original-price {
    font-size: 0.85rem;
    color: #565959;
    text-decoration: line-through;
    margin-left: 8px;
}

.deal-label {
    background: #c45500;
    color: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.prime-badge {
    color: #007185;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 2rem;
    color: #0F1111;
    margin-bottom: 20px;
    font-weight: 700;
}

.modal-text {
    font-size: 1.1rem;
    color: #565959;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-button {
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #111;
}

.modal-button:hover {
    background: linear-gradient(to bottom, #f5d78e, #edb932);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .header-main {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .game-stats-bar {
        flex-direction: column;
        gap: 10px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .start-content {
        padding: 30px 20px;
    }

    .header-nav {
        gap: 10px;
    }

    .nav-item {
        font-size: 0.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .targets-grid {
        gap: 8px;
    }

    .target-product-image {
        width: 40px;
        height: 40px;
    }
}
