body {
    font-family: Arial, sans-serif; 
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #333;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links a {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
}

.nav-links a:hover {
    color: #333;
}

main {
    flex: 1;
    padding: 20px;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

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

.auth-box {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-box h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

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

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.welcome-section {
    text-align: center;
    padding: 3rem 1rem;
}

.welcome-section h1 {
    margin-bottom: 1rem;
    color: #333;
}

.welcome-section p {
    margin-bottom: 2rem;
    color: #666;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.user-panel {
    text-align: right;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.nft-generator {
    margin-bottom: 30px;
}

.nft-generator textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nft-generator .button-group button {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.nft-generator button:hover {
    background: #218838;
}

.nft-generator button:disabled {
    background: #6c757d;
}

.generated-nft {
    max-width: 100%;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.image-selection {
    margin-top: 20px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.image-option {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.save-nft {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-nft:hover {
    background: #218838;
}

.save-nft:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.saved-notice {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    margin: 20px 0;
}

.gallery {
    margin-top: 30px;
}

.nft-item {
    display: inline-block;
    width: 200px;
    margin: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nft-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.nft-item p {
    margin: 10px 0 5px;
    font-size: 14px;
}

.delete-nft {
    margin-top: 5px;
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.delete-nft:hover {
    background: #c82333;
}

.delete-nft:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.nft-item small {
    color: #6c757d;
    font-size: 12px;
}

.lazy-mint-info {
    display: block;
    margin-top: 5px;
    padding: 5px 8px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 12px;
}

.tx-link {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #007bff;
    text-decoration: none;
}

.tx-link:hover {
    text-decoration: underline;
}

.wallet-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.mm-connect {
    display: inline-block;
    padding: 8px 15px;
    background: #f6851b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mm-connect:hover {
    background: #e2761b;
}

.mm-connect.connected {
    background: #28a745;
}

.mm-connect.connected:hover {
    background: #218838;
}

/* View Metadata Button */
.view-metadata {
    display: block;
    margin-top: 5px;
    padding: 5px 10px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.view-metadata:hover {
    background: #138496;
}

/* Metadata Modal */
.metadata-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.metadata-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

.metadata-json {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow-x: auto;
}

.metadata-json pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
}

.metadata-status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

.status-note {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Update NFT Form Modal */
.update-nft-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.update-nft-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.update-nft-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-nft-form input,
.update-nft-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.update-nft-form textarea {
    min-height: 100px;
    resize: vertical;
}

.update-nft-form button {
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.update-nft-form button:hover {
    background: #218838;
}

.update-nft-form button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.cancel-update {
    background: #6c757d !important;
}

.cancel-update:hover {
    background: #5a6268 !important;
}

/* Store Settings Styles */
.settings-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-container h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.url-input-group {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.url-prefix {
    padding: 0.75rem;
    background: #f5f5f5;
    color: #666;
    border-right: 1px solid #ddd;
    font-family: monospace;
}

.url-input-group input {
    flex: 1;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
}

.url-input-group input:focus {
    outline: none;
}

.settings-form small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.form-actions {
    margin-top: 1rem;
}

.form-actions button {
    width: 100%;
}

/* Store Styles */
.store-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.store-header h1 {
    margin: 0;
    color: #333;
}

.cart-widget {
    position: relative;
}

.cart-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.cart-link:hover {
    background: #0056b3;
}

.store-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.listing-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.listing-item:hover {
    transform: translateY(-5px);
}

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

.listing-details {
    padding: 1rem;
}

.listing-details h3 {
    margin: 0 0 0.5rem;
    color: #333;
    font-size: 1.1rem;
}

.listing-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.listing-price {
    font-weight: bold;
    color: #28a745;
    margin-bottom: 1rem;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.add-to-cart:hover {
    background: #218838;
}

.add-to-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Cart Styles */
.cart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.cart-container h1 {
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    padding: 1rem;
    position: relative;
}

.cart-item-details h3 {
    margin: 0 0 0.5rem;
    color: #333;
}

.cart-item-description {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cart-item-seller {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-seller a {
    color: #007bff;
    text-decoration: none;
}

.cart-item-seller a:hover {
    text-decoration: underline;
}

.cart-item-price {
    font-weight: bold;
    color: #28a745;
    margin-bottom: 1rem;
}

.remove-from-cart {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.remove-from-cart:hover {
    background: #c82333;
}

.cart-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.total-amount {
    color: #28a745;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-cart p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Error Page Styles */
.error-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-container h1 {
    margin-bottom: 1rem;
    color: #dc3545;
}

.error-container p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Store Frontend Styles */
.store-site-header {
    background: #1a1a1a;
    padding: 1rem 0;
    color: white;
}

.store-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-nav-left {
    flex: 1;
}

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

.store-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.store-nav-left .store-logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.store-nav-right {
    display: flex;
    gap: 20px;
}

.store-nav-right .nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.store-nav-right .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.store-main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.store-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.store-directory h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.store-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.store-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.store-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.store-card h2 {
    margin: 0 0 0.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.store-owner {
    color: #666;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.store-stats {
    color: #2980b9;
    margin: 0.5rem 0 0;
    font-weight: 500;
}

.no-stores {
    text-align: center;
    grid-column: 1 / -1;
    color: #666;
    padding: 2rem;
}

.store-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.store-footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

.store-footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.store-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.store-footer-section ul li a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

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

.store-footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1rem 20px 0;
    border-top: 1px solid #333;
    text-align: center;
    color: #999;
}

/* Update NFT Page Styles */
.update-nft-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.update-nft-container h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.update-nft-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.update-nft-form .form-group {
    display: flex;
    flex-direction: column;
}

.update-nft-form .form-group label {
    margin-bottom: 0.5rem;
    color: #666;
}

.update-nft-form .form-group input,
.update-nft-form .form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.update-nft-form .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.update-nft-form .btn-primary {
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
}

.update-nft-form .btn-primary:hover {
    background: #0056b3;
}

/* Listing Toggle Switch Styles */
.listing-toggle-group {
    margin: 1rem 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #28a745;
}

input:focus + .slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
}

/* Search Preview Box Styles */
.search-preview-box {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.search-preview-box h3 {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-result {
    font-family: Arial, sans-serif;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-title {
    color: #1a0dab;
    font-size: 20px;
    margin-bottom: 5px;
    cursor: pointer;
}

.search-title:hover {
    text-decoration: underline;
}

.search-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 8px;
}

.search-description {
    color: #545454;
    font-size: 14px;
    line-height: 1.58;
}

.nft-copies {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}
