﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary-color: #dc2626;
    --primary-hover: #b91c1c;
    --secondary-color: #6b7280;
    --accent-color: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --japanese-red: #dc2626;
    --japanese-red-light: #fef2f2;
    --japanese-black: #1f2937;
    --japanese-gray: #e5e7eb;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

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

html, body {
    height: 100%;
    font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    font-family: 'Noto Sans JP', sans-serif;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

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

.main-content {
    flex: 1;
}

.main-header {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar {
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

    .navbar::before {
        position: absolute;
        right: 50%;
        top: 50%;
        transform: translate(50%, -50%);
        font-size: 2.5rem;
        color: var(--japanese-red);
        opacity: 0.1;
        font-weight: 700;
        z-index: -1;
        pointer-events: none;
    }

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-family: 'Noto Sans JP', sans-serif;
}

    .navbar-brand:hover {
        color: var(--japanese-red);
    }

.brand-text {
    background: linear-gradient(135deg, var(--japanese-red), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-weight: 500;
    border: 1px solid transparent;
}

    .nav-link:hover {
        color: var(--japanese-red);
        background: var(--japanese-red-light);
        border-color: var(--japanese-red);
    }

.balance-display {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--success-color);
    font-size: 0.875rem;
}

.user-menu {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-fast);
}

    .user-menu:hover {
        background: var(--japanese-red-light);
        border-color: var(--japanese-red);
        color: var(--japanese-red);
    }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    line-height: 1;
    gap: 0.5rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-primary {
    background: var(--japanese-red);
    color: white;
    border-color: var(--japanese-red);
}

    .btn-primary:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
        color: white;
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

    .btn-secondary:hover {
        background: var(--bg-secondary);
        border-color: var(--border-hover);
        color: var(--text-primary);
        transform: translateY(-1px);
    }

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

    .btn-success:hover {
        background: #047857;
        border-color: #047857;
        color: white;
        transform: translateY(-1px);
    }

.btn-outline-light {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

    .btn-outline-light:hover {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

.btn-outline-primary {
    background: transparent;
    color: var(--japanese-red);
    border-color: var(--japanese-red);
}

    .btn-outline-primary:hover {
        background: var(--japanese-red);
        color: white;
        transform: translateY(-1px);
    }

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 0.9375rem;
}

.w-100 {
    width: 100%;
}

/* Hero Section - японский стиль */
.hero-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: 'ゲーム';
        position: absolute;
        top: 20%;
        right: 10%;
        font-size: 15rem;
        color: var(--japanese-red);
        opacity: 0.03;
        font-weight: 900;
        z-index: 0;
        pointer-events: none;
        transform: rotate(-15deg);
    }

    .hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 80%, rgba(220, 38, 38, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
        pointer-events: none;
    }

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--japanese-red), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* Секции */
.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: var(--japanese-red);
        border-radius: 2px;
    }

.features-section {
    background: var(--bg-secondary);
}

.cases-section {
    background: var(--bg-primary);
}

.stats-section {
    background: var(--bg-secondary);
}

.feature-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-normal);
    height: 100%;
    margin-bottom: 2rem;
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--japanese-red);
    }

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--japanese-red);
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.case-card {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
    margin-bottom: 2rem;
}

    .case-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--japanese-red);
    }

.case-header {
    padding: 2rem;
    color: white;
    text-align: left;
}

.case-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.case-header h4 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
}

.case-price {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.case-body {
    padding: 2rem;
}

    .case-body p {
        margin-bottom: 1.5rem;
    }

.case-games {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

    .case-games strong {
        color: var(--text-primary);
        display: block;
        margin-bottom: 0.5rem;
    }

    .case-games small {
        color: var(--text-muted);
    }

.case-footer {
    padding: 0 2rem 2rem;
}

.profile-sidebar {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.profile-card {
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.profile-avatar {
    font-size: 4rem;
    color: var(--japanese-red);
    margin-bottom: 1rem;
}

.profile-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

    .profile-stats .stat {
        align-items: center;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        text-align: center;
    }

        .profile-stats .stat strong {
            display: block;
            font-size: 1.5rem;
            color: var(--japanese-red);
            font-family: 'JetBrains Mono', monospace;
            margin-bottom: 0.25rem;
        }

        .profile-stats .stat span {
            color: var(--text-muted);
            font-size: 0.875rem;
        }

.profile-menu {
    padding: 0;
}

.menu-item {
    display: block;
    padding: 1.25rem 1.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

    .menu-item:hover,
    .menu-item.active {
        background: var(--japanese-red-light);
        color: var(--japanese-red);
        border-left: 4px solid var(--japanese-red);
        padding-left: 1.5rem;
    }

.profile-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.keys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.key-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

    .key-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--japanese-red);
    }

.key-header {
    display: flex;
    padding: 1.75rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.game-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-right: 1rem;
    border: 2px solid var(--border-color);
}

.key-info {
    flex: 1;
}

    .key-info h5 {
        margin-bottom: 0.5rem;
        color: var(--text-primary);
        font-size: 1.125rem;
    }

.key-body {
    padding: 1.75rem;
}

.key-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.key-price {
    font-weight: 600;
    color: var(--success-color);
    font-family: 'JetBrains Mono', monospace;
}

.key-actions {
    display: flex;
    gap: 0.75rem;
}

.key-display {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-primary);
    word-break: break-all;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 1rem;
}

    .stat-item h3 {
        font-size: 3.5rem;
        color: var(--japanese-red);
        margin-bottom: 0.5rem;
        font-family: 'JetBrains Mono', monospace;
        font-weight: 700;
    }

    .stat-item p {
        color: var(--text-secondary);
        font-size: 1rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.main-footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: var(--transition-fast);
}

    .footer-link:hover {
        color: var(--japanese-red);
    }

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.me-3 {
    margin-right: 0.75rem;
}

.ms-auto {
    margin-left: auto;
}

.d-flex {
    display: flex;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.row {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-12, .col-md-3, .col-md-4, .col-md-6, .col-lg-4, .col-lg-12 {
    padding: 0 0.75rem;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

    .dropdown-item:hover {
        background: var(--japanese-red-light);
        color: var(--japanese-red);
    }

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    border: none;
    margin: 0.5rem 0;
}

.case-opening-container {
    padding: 4rem 0;
}

.case-opening-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.case-header h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.case-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--japanese-red);
    font-family: 'JetBrains Mono', monospace;
    margin: 1rem 0;
}

.games-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.game-preview-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

    .game-preview-item:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--japanese-red);
    }

.game-preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.game-preview-info h6 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.more-games {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.more-indicator {
    text-align: center;
}

    .more-indicator .feature-icon {
        margin-bottom: 0.5rem;
        color: var(--japanese-red);
    }

.case-actions {
    margin: 3rem 0;
}

.opening-animation {
    padding: 3rem 0;
}

.case-spinner {
    margin-bottom: 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--japanese-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.case-result {
    padding: 2rem 0;
}

.result-animation {
    margin-bottom: 2rem;
}

.won-game {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.won-game-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-right: 2rem;
    border: 2px solid var(--border-color);
}

.won-game-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.won-game-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.won-game-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--japanese-red);
    font-family: 'JetBrains Mono', monospace;
}

.japanese-accent {
    position: relative;
}

    .japanese-accent::before {
        content: '●';
        color: var(--japanese-red);
        margin-right: 0.5rem;
    }

.zen-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--japanese-red), transparent);
    margin: 3rem 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    .col-md-3, .col-md-4, .col-md-6, .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

        .navbar::before {
            display: none;
        }

    .navbar-nav {
        width: 100%;
        justify-content: center;
    }

    .case-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .key-header {
        flex-direction: column;
        text-align: center;
    }

    .game-image {
        margin: 0 auto 1rem;
    }

    .hero-section::before {
        font-size: 8rem;
        right: 5%;
    }
}

#blazor-error-ui {
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

    #blazor-error-ui .reload {
        color: white;
        text-decoration: underline;
        margin-left: 1rem;
    }

    #blazor-error-ui .dismiss {
        float: right;
        cursor: pointer;
        margin-left: 1rem;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--japanese-red) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-primary {
    background-color: var(--japanese-red) !important;
}

.bg-secondary {
    background-color: var(--bg-secondary) !important;
}

.border-0 {
    border: none !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.d-none {
    display: none !important;
}

@media (max-width: 768px) {
    .d-md-none {
        display: none !important;
    }
}

.navbar-expand-lg .navbar-nav {
    flex-direction: row;
}

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

.bi {
    margin-right: 0.5rem;
}

.torii-accent {
    position: relative;
    padding-top: 1rem;
}

    .torii-accent::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: var(--japanese-red);
        border-radius: 2px;
    }

.minimalist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

    .minimalist-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--japanese-red);
        transform: scaleY(0);
        transition: var(--transition-normal);
    }

    .minimalist-card:hover::before {
        transform: scaleY(1);
    }

    .minimalist-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }


/* Стили для кликабельного баланса */
.balance-display {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.balance-display:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.balance-display:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Анимация для модального окна */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Стили для модального окна пополнения */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.payment-preview {
    animation: slideIn 0.3s ease-out;
}

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

/* Улучшенные стили для формы */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.btn {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}


/* Admin Panel Styles */
.admin-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.admin-sidebar h4 {
    color: #495057;
    margin-bottom: 20px;
    font-weight: 600;
}

.admin-sidebar .nav-link {
    color: #495057;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.admin-sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
}

.admin-sidebar .nav-link i {
    margin-right: 8px;
    width: 16px;
}

.admin-content {
    padding: 20px;
}

.game-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    width: 50px;
    height: 50px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #6c757d;
    border-radius: 4px;
    text-align: center;
}

.key-display {
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.game-item {
    transition: all 0.2s ease;
}

.game-item:hover {
    background-color: #f8f9fa !important;
}

.available-games, .case-games {
    max-height: 400px;
    overflow-y: auto;
}

.admin-statistics .card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.admin-statistics .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.badge {
    font-size: 0.8em;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    .admin-sidebar {
        margin-bottom: 20px;
    }
    
    .admin-content {
        padding: 10px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .game-thumbnail, .no-image {
        width: 40px;
        height: 40px;
    }
}


/* Admin Panel Styles */
.admin-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.admin-sidebar h4 {
    color: #495057;
    margin-bottom: 20px;
    font-weight: 600;
}

.admin-sidebar .nav-link {
    color: #495057;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.admin-sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
}

.admin-sidebar .nav-link i {
    margin-right: 8px;
    width: 16px;
}

.admin-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.key-display {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
}

.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.list-group-item {
    border: 1px solid #dee2e6;
    border-radius: 6px !important;
    margin-bottom: 4px;
}

.spinner-border {
    color: #007bff;
}


/* Стили для экономики кейсов */
.admin-case-economics {
    padding: 20px;
}

.case-economics-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.economics-metric {
    text-align: center;
    padding: 15px;
}

.economics-metric h4 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.economics-metric p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.economics-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.economics-table .table {
    margin-bottom: 0;
}

.economics-table .table thead th {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.economics-table .table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: #f8f9fa;
}

.economics-table .table tbody tr:hover {
    background-color: #f8f9fa;
}

.margin-positive {
    color: #28a745;
    font-weight: bold;
}

.margin-negative {
    color: #dc3545;
    font-weight: bold;
}

.chance-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.key-count-badge {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.game-name-cell {
    font-weight: 600;
    color: #2c3e50;
}

.steam-price-small {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.economics-actions .btn {
    margin-right: 5px;
    border-radius: 20px;
    padding: 5px 12px;
}

.case-selector {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.case-selector select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
}

.case-selector select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.economics-info-alert {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.economics-loading {
    text-align: center;
    padding: 50px;
}

.economics-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #667eea;
}

/* Адаптивность */
@media (max-width: 768px) {
    .economics-metric h4 {
        font-size: 1.5rem;
    }
    
    .economics-table {
        font-size: 0.9rem;
    }
    
    .economics-actions .btn {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}


/* Стили для реферальной программы */
.referral-stats .card {
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: transform 0.3s ease;
}

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

.referral-stats .card-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.referral-link-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.referral-link-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.referral-code {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.copy-button {
    transition: all 0.3s ease;
}

.copy-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.referral-bonus-alert {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    border-radius: 8px;
}


/* Стили для реферального баннера на главной странице */
.referral-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    margin: 2rem 0;
}

.referral-promo-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.referral-promo-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: bold;
}

.referral-promo-card p {
    color: #666;
    font-size: 1.1rem;
}

.referral-promo-card .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.referral-promo-card .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}


/* Games Library Section */
.games-library-section {
    background: var(--bg-secondary);
}

.game-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--japanese-red);
}

.game-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.game-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.game-price-section {
    margin-top: auto;
}

.price-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.original-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.875rem;
}

.shop-price {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.125rem;
    font-family: 'JetBrains Mono', monospace;
}

.game-price-section .btn {
    width: 100%;
}

/* Referral Banner */
.referral-banner {
    background: linear-gradient(135deg, var(--success-color), #047857);
    padding: 2rem 0;
}

.referral-promo-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.referral-promo-card h3 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.referral-promo-card p {
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-card {
        margin-bottom: 1.5rem;
    }
    
    .game-info {
        padding: 1.25rem;
    }
    
    .price-comparison {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .referral-promo-card {
        text-align: center;
    }
    
    .referral-promo-card .col-md-4 {
        margin-top: 1rem;
    }
}
