:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --text: #ffffff;
    --text-secondary: #b8b8b8;
    --border-radius: 8px;
}
/* Notification Styles */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-notification.success {
    background-color: #4CAF50;
}

.custom-notification.error {
    background-color: #f44336;
}

.custom-notification.info {
    background-color: #2196F3;
}

/* Profile Page Styles */
.profile-section {
    background-color: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.purchase-card {
    background-color: rgba(15, 52, 96, 0.3);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.purchase-card:hover {
    background-color: rgba(15, 52, 96, 0.5);
}

.purchase-card img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.key-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.key-value {
    font-family: monospace;
    background-color: var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
}

.copy-btn {
    background-color: var(--highlight);
    color: var(--text);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    opacity: 0.8;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: var(--primary);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--highlight);
    text-decoration: none;
}



/* Search Form */
.search-form {
    display: flex;
    margin-left: auto;
    margin-right: 20px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 250px;
    font-size: 14px;
}

.search-button {
    padding: 8px 15px;
    background: #0f3460;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #0d2b4e;
}

/* Search Results */
.search-results-container {
    padding: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0f3460;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.btn:hover {
    background: #0d2b4e;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    flex: 1;
}

/* Header */
header {
    background-color: var(--secondary);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--highlight);
}

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

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--highlight);
    text-decoration: none;
}

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

.user-actions a {
    margin-left: 15px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 50px 0;
    margin-bottom: 40px;
    background-color: var(--secondary);
    border-radius: var(--border-radius);
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Games grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.game-card {
    background-color: var(--secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.game-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px #FFD700, 0 0 30px rgba(255, 215, 0, 0.5);
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.game-card h3 {
    padding: 15px;
    font-size: 16px;
}

.game-price {
    padding: 0 15px 15px;
    font-weight: bold;
    color: var(--highlight);
}

.game-stock {
    padding: 0 15px 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.add-to-cart {
    display: block;
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 8px;
    background-color: var(--accent);
    color: #ffff; 
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
    font-weight: bold;
}

.add-to-cart:hover {
    background-color: #FFD700; /* Полностью золотая кнопка */
    box-shadow: 0 0 10px #FFD700, 0 0 20px rgba(255, 215, 0, 0.4);
    color: #000; /* Текст остаётся чёрным */
}

/* Game details */
.game-details {
    margin-top: 30px;
}

.game-main {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.game-poster {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.game-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.game-price {
    font-size: 24px;
    color: var(--highlight);
    margin-bottom: 15px;
}

.game-stock {
    font-size: 16px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(46, 125, 50, 0.2) 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #e8f5e9;
    font-weight: 500;
    vertical-align: middle;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    margin-left: 15px; /* Отступ от цены */
}

.buy-now {
    padding: 12px 25px;
    background-color: var(--highlight);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.buy-now:hover {
    opacity: 0.9;
}

.game-description {
    margin-bottom: 40px;
}

.game-description h2 {
    margin-bottom: 15px;
}

.game-description p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.game-screenshots h2 {
    margin-bottom: 20px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.screenshot-link img {
    width: 1100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.3s;
}

.screenshot-link img:hover {
    transform: scale(1.05);
}

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

.modal-content {
    display: block;
    margin: 50px auto;
    max-width: 90%;
    max-height: 80vh;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--highlight);
}

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

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: var(--secondary);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.cart-item img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

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

.cart-item-info h3 {
    margin-bottom: 10px;
}

.remove-from-cart {
    padding: 5px 10px;
    background-color: #ff4d4d;
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-top: 10px;
}

.remove-from-cart:hover {
    opacity: 0.8;
}

.cart-summary {
    background-color: var(--secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    max-width: 400px;
    margin-left: auto;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-weight: bold;
    font-size: 18px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--accent);
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--highlight);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: opacity 0.3s;
}

.checkout-button:hover {
    opacity: 0.9;
}

/* Purchase history */
.purchases-list {
    margin-top: 30px;
}

.purchase-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: var(--secondary);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.purchase-item img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.purchase-info {
    flex: 1;
}

.purchase-info h3 {
    margin-bottom: 10px;
}

.purchase-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.purchase-key {
    padding: 8px;
    background-color: var(--accent);
    border-radius: var(--border-radius);
    font-family: monospace;
}

/* Auth forms */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
}

.auth-form {
    background-color: var(--secondary);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: var(--primary);
    border: 1px solid var(--accent);
    border-radius: var(--border-radius);
    color: var(--text);
}

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

.auth-button {
    width: 100%;
    padding: 12px;
    background-color: var(--highlight);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.auth-button:hover {
    opacity: 0.9;
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert.error {
    background-color: #ff4d4d;
}

.alert.success {
    background-color: #4CAF50;
}

/* Footer */
footer {
    background-color: var(--secondary);
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--highlight);
    text-decoration: none;
}

.copyright {
    color: var(--text-secondary);
    font-size: 14px;
}