/* reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f0f12;
    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

/* header */
header {
    background: linear-gradient(145deg, #1a1a24, #13131a);
    padding: 1.2rem 0;
    border-bottom: 1px solid #2a2a35;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 10;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    font-size: 1.9rem;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav a {
    color: #ccc;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #a855f7;
}

/* main */
main {
    flex: 1;
    padding: 2rem 0;
}

/* search */
.search-box {
    margin-bottom: 2.5rem;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #1e1e28;
    border: 1px solid #33333f;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: 0.2s;
}

#searchInput:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}

/* products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}

/* product card */
.product-card {
    background: #1b1b24;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #2b2b36;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(168,85,247,0.2);
    border-color: #a855f7;
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #2a2a35;
}

.card-content {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #eaeaea;
}

.card-price {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #262630;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    margin-top: 0.8rem;
}

.original-price {
    font-weight: 600;
    color: #facc15;
}

.dollar-price {
    font-size: 0.9rem;
    color: #94a3b8;
    background: #33333f;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
}

/* details page */
.details-card {
    background: #1b1b24;
    border-radius: 30px;
    padding: 2rem;
    border: 1px solid #2b2b36;
    margin-bottom: 2rem;
}

.detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.detail-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 30px;
    border: 2px solid #a855f7;
}

.detail-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: #2a2a35;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    font-size: 0.9rem;
}

.badge.available {
    background: #166534;
    color: #bbf7d0;
}

.badge.unavailable {
    background: #7f1d1d;
    color: #fecaca;
}

/* fields grid */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.field-item {
    background: #262630;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #3a3a48;
    transition: 0.1s;
}

.field-item .label {
    font-weight: 600;
    color: #a855f7;
    margin-left: 10px;
}

.field-item .value {
    color: #ddd;
    word-break: break-word;
    max-width: 60%;
    text-align: left;
    direction: ltr;
}

.copy-btn {
    background: transparent;
    border: 1px solid #4b4b5e;
    color: #ccc;
    border-radius: 12px;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    margin-right: 8px;
}

.copy-btn:hover {
    background: #a855f7;
    border-color: #a855f7;
    color: white;
}

/* settings */
.settings-card {
    background: #1b1b24;
    border-radius: 30px;
    padding: 2.5rem;
    max-width: 500px;
    margin: 2rem auto;
    border: 1px solid #2b2b36;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #262630;
    border: 1px solid #3f3f4e;
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-group button {
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.form-group button:hover {
    opacity: 0.9;
}

.status-msg {
    margin-top: 1rem;
    color: #4ade80;
}

/* back link */
.back-link a {
    color: #a855f7;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
}

.back-link a:hover {
    text-decoration: underline;
}

/* footer */
footer {
    background: #13131a;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid #2a2a35;
    color: #6b7280;
    margin-top: 3rem;
}

/* notification */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #a855f7;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(168,85,247,0.5);
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* responsive */
@media (max-width: 600px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    nav a {
        margin: 0 10px;
    }
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .field-item {
        flex-wrap: wrap;
        gap: 10px;
    }
}