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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    text-align: center;
    border-bottom: 1px solid #222;
}

header h1 {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.nav-link {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-link.active {
    color: #fff;
    border-bottom: 1px solid #fff;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 20px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput::placeholder {
    color: #666;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #555;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-size: 1.2rem;
}

.feed-container {
    margin-top: 160px;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: calc(100vh - 160px);
}

.post {
    height: calc(100vh - 160px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.post.hidden {
    display: none;
}

.post-images {
    width: 100%;
    max-width: 500px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
    -webkit-overflow-scrolling: touch;
}

.post-images::-webkit-scrollbar {
    height: 8px;
}

.post-images::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.post-images::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.post-images::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.post-images img {
    width: 100%;
    min-width: 100%;
    height: 55vh;
    object-fit: cover;
    border-radius: 8px;
    scroll-snap-align: start;
    cursor: grab;
    user-select: none;
}

.post-images img:active {
    cursor: grabbing;
}

.post-images.multi img {
    min-width: 100%;
}

.post-info {
    margin-top: 20px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding-bottom: 80px;
}

.color-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-dot:hover {
    transform: scale(1.15);
    border-color: #666;
}

.color-dot.active {
    border-color: #fff;
    border-width: 3px;
    transform: scale(1.2);
}

.post-info h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.price {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: #fff;
}

.add-to-cart {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.add-to-cart:hover {
    background: #ddd;
    transform: scale(1.05);
}

.add-to-cart:active {
    transform: scale(0.95);
}

.cart-icon {
    position: fixed;
    bottom: 30px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    z-index: 101;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon:active {
    transform: scale(0.95);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4A9EFF;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Story Page Styles */
.story-container {
    max-width: 800px;
    margin: 160px auto 50px;
    padding: 40px 20px;
    line-height: 1.8;
}

.story-container h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-align: center;
}

.story-container p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ccc;
    text-align: center;
}

.story-container .highlight {
    color: #fff;
    font-weight: 400;
}

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

.checkout-modal.active {
    display: flex;
}

.checkout-content {
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkout-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
}

.close-checkout {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-checkout:hover {
    color: #ccc;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-color {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 1.1rem;
    color: #4CAF50;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.cart-item-remove:hover {
    color: #cc0000;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}

.cart-total-label {
    font-size: 1.2rem;
    font-weight: 500;
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: 500;
    color: #4CAF50;
}

.checkout-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #ddd;
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

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

.empty-cart-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.empty-cart-text {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .post-images img {
        height: 45vh;
    }
    
    header h1 {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    #searchInput {
        font-size: 0.85rem;
    }
    
    .story-container {
        margin-top: 180px;
        padding: 20px;
    }
    
    .story-container h2 {
        font-size: 2rem;
    }
    
    .story-container p {
        font-size: 1rem;
    }
    
    .post-info {
        padding-bottom: 120px;
    }
}
