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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.user-info {
    font-size: 14px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #653a8a;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

.games-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.game-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e0e0e0;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 20px;
}

.game-info h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.game-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.game-category {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
}

.game-price {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.game-actions {
    display: flex;
    gap: 10px;
}

.game-actions .btn {
    flex: 1;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links p {
    margin: 10px 0;
    color: #666;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

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

.game-detail {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.game-detail-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.game-detail-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-demo-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.game-demo-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.demo-qrcode {
    text-align: center;
    margin-bottom: 15px;
}

.demo-qrcode img {
    width: 200px;
    height: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.demo-qrcode p {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.game-detail-right h2 {
    color: #333;
    margin-bottom: 15px;
}

.game-category-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.game-price-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.price-label {
    font-size: 16px;
    color: #666;
}

.price-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-left: 10px;
}

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

.game-description h3 {
    margin-bottom: 15px;
    color: #333;
}

.game-features {
    margin-bottom: 30px;
}

.game-features h3 {
    margin-bottom: 15px;
    color: #333;
}

.game-features ul {
    list-style: none;
}

.game-features li {
    padding: 10px 0;
    color: #666;
    font-size: 16px;
}

.purchase-section {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.purchase-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.purchase-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.purchase-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.purchase-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.purchase-item-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.purchase-item-info p {
    color: #666;
    font-size: 14px;
}

.purchase-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
}

.summary-row .price {
    color: #667eea;
    font-weight: bold;
}

.payment-method {
    margin-bottom: 30px;
}

.payment-method h3 {
    margin-bottom: 15px;
    color: #333;
}

.payment-option {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-note {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.dashboard-section {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.dashboard-section h2 {
    margin-bottom: 30px;
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.empty-state p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.purchase-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.purchase-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e0e0e0;
}

.purchase-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase-info {
    padding: 20px;
}

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

.purchase-date,
.purchase-code {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.purchase-url {
    margin: 15px 0;
}

.purchase-url label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

.purchase-url input {
    width: calc(100% - 60px);
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
}

.purchase-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.qrcode-section {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.qrcode-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.qrcode-box h2 {
    color: #333;
    margin-bottom: 10px;
}

.qrcode-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.qrcode-display {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.qrcode-display img {
    max-width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.qrcode-info {
    text-align: left;
    margin-bottom: 30px;
}

.qrcode-info p {
    margin-bottom: 10px;
    color: #333;
}

.url-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.url-box input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.qrcode-note {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.qrcode-actions {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .game-detail-content {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .purchases-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .qrcode-actions {
        flex-direction: column;
    }
}
