* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

body {
    background: #f5f5f5;
    color: #1e1e2a;
    padding-bottom: 2rem;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #1e1e2a;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    color: #ffb347;
}
.nav {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav a, .nav span {
    color: white;
    text-decoration: none;
    transition: 0.2s;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
}
.nav a:hover { background: #ffb347; color: #1e1e2a; }
.btn-login {
    background: #ffb347;
    color: #1e1e2a !important;
    font-weight: bold;
}
.btn-logout {
    background: #dc3545;
    color: white !important;
    margin-left: 0.5rem;
}
.btn-logout:hover { background: #c82333; }

/* Карточки товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); }
.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f0f0f0;
    display: block;
}
.product-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.5rem;
    color: #ff6b35;
    font-weight: bold;
}
.product-desc {
    color: #555;
    margin: 0.8rem 0;
    font-size: 0.9rem;
    flex: 1;
}
.btn-buy {
    background: #ff6b35;
    border: none;
    color: white;
    padding: 10px 0;
    width: 100%;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn-buy:hover { background: #e05a2a; }

/* Модальное окно оплаты */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    border-radius: 30px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    text-align: center;
}
.payment-methods {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.pay-btn {
    background: #1e1e2a;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.pay-btn.crypto { background: #2c3e66; }
.pay-btn.card { background: #27ae60; }
.wallet-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 16px;
    margin-top: 1rem;
    text-align: left;
}
.wallet-item {
    margin-bottom: 1rem;
    word-break: break-all;
}
.wallet-label {
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}
.wallet-address {
    font-family: monospace;
    background: #e9ecef;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    white-space: normal;
    word-break: break-all;
}
.copy-btn {
    background: #ff6b35;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 8px;
    transition: 0.2s;
}
.copy-btn:hover { background: #e05a2a; }
.close-modal {
    margin-top: 20px;
    background: #aaa;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
}

/* Страницы логина и регистрации */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background: white;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.auth-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}
.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 50px;
    border: 1px solid #ccc;
}
.auth-container button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
}
.auth-container button:hover { background: #e05a2a; }
.auth-container p {
    text-align: center;
    margin-top: 15px;
}
.error {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

/* Админ-панель */
.admin-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.admin-section h3 {
    margin-bottom: 1rem;
    border-left: 5px solid #ff6b35;
    padding-left: 15px;
}
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
}
.admin-form input, .admin-form textarea, .admin-form select {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ccc;
}
.admin-form button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 40px;
    cursor: pointer;
}
.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.admin-product-card {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 10px;
    text-align: center;
}
.admin-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}
.admin-product-card button {
    background: #dc3545;
    margin-top: 8px;
}

/* Адаптив */
@media (max-width: 768px) {
    .header .container { flex-direction: column; gap: 10px; }
    .nav { justify-content: center; }
    .products-grid { gap: 1rem; }
    .product-img { height: 180px; }
    .modal-content { width: 95%; padding: 1rem; }
    .wallet-address { font-size: 0.8rem; }
    .copy-btn { display: inline-block; margin-top: 5px; margin-left: 0; }
}