/* ObscuraMarket - Main Stylesheet */
:root {
    --primary-dark: #1a0933;
    --primary: #2d1158;
    --primary-light: #3d1b70;
    --accent: #8a2be2;
    --accent-light: #9d44e6;
    --text-light: #f8f5fd;
    --text-dark: #1a0933;
    --bg-dark: #0a0418;
    --bg-light: #150b2e;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background-color: var(--primary-dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo-text {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

nav ul li a:hover {
    background-color: var(--primary-light);
}

nav ul li a.active {
    background-color: var(--primary);
    color: var(--accent-light);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.5rem;
    transition: transform var(--transition-speed);
}

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

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: var(--text-light);
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Content Styles */
main {
    flex: 1;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Products Styles */
.featured-products,
.products-section,
.payment-options {
    padding: 3rem 2rem;
    background-color: var(--bg-light);
}

.featured-products h2,
.products-section h2,
.payment-options h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-light);
    font-size: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: var(--primary-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed);
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-light);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.product-price {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.add-to-cart {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.95rem;
}

/* Payment Options */
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.payment-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2.5rem;
    color: var(--accent-light);
}

.payment-icon span {
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Footer Styles */
footer {
    background-color: var(--primary-dark);
    padding: 3rem 2rem 1rem;
}

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

.footer-section h3 {
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

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

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-section a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(248, 245, 253, 0.1);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background-color: var(--primary-dark);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 200;
    transition: right var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(248, 245, 253, 0.1);
}

.close-cart {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(248, 245, 253, 0.1);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--accent-light);
}

.cart-item-actions {
    display: flex;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.quantity-btn {
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-value {
    margin: 0 0.5rem;
}

.remove-item {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(248, 245, 253, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--accent-light);
}

/* Checkout Page */
.checkout-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--primary-dark);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.order-summary {
    margin-bottom: 2rem;
}

.order-items {
    margin-top: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(248, 245, 253, 0.1);
}

.summary-total {
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--accent);
}

.payment-methods {
    margin: 2rem 0;
}

.payment-method {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--primary-light);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
}

.payment-method:hover {
    border-color: var(--accent);
    background-color: rgba(138, 43, 226, 0.1);
}

.payment-method.selected {
    border-color: var(--accent);
    background-color: rgba(138, 43, 226, 0.2);
}

.payment-method-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--accent-light);
}

.payment-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 4px;
}

.payment-info {
    margin-bottom: 1.5rem;
}

.payment-info-item {
    display: flex;
    margin-bottom: 0.8rem;
}

.payment-info-label {
    min-width: 150px;
    font-weight: 600;
}

.crypto-address {
    font-family: monospace;
    padding: 0.5rem;
    background-color: var(--primary);
    border-radius: 4px;
    word-break: break-all;
}

.copy-btn {
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    margin-left: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-speed);
}

.copy-btn:hover {
    background-color: var(--primary-light);
}

.checkout-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--primary-light);
    background-color: var(--bg-dark);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-order {
    background-color: var(--accent);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav {
        margin: 1rem 0;
    }
    
    .cart-icon {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn var(--transition-speed) ease-in;
}

.slide-in {
    animation: slideIn var(--transition-speed) ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent-light);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.complete-payment {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.complete-payment:disabled {
    background-color: #95a5a6;
    cursor: wait;
}

.cancel-payment {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.payment-method {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.payment-method:hover {
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.5);
    transform: translateY(-2px);
}

.payment-method.active {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.7);
    animation: jellyPress 0.6s ease;
}

@keyframes jellyPress {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    40% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    65% { transform: scale(0.98); }
    80% { transform: scale(1.02); }
    100% { transform: scale(1); }
}