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

html, body {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h1 {
    font-size: 3em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-subtitle {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: inline-flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.balance-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 1.5em;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    border-radius: 15px;
}

.balance, .profit {
    display: flex;
    gap: 10px;
}

#balance {
    color: #4ade80;
    font-weight: bold;
}

#profit {
    font-weight: bold;
}

#profit.positive {
    color: #4ade80;
}

#profit.negative {
    color: #f87171;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
    }
}

.slot-section, .crash-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: none;
}

h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Slot Machine Styles */
.slot-machine {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.reel {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.spin-container {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.spin-symbol {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    flex-shrink: 0;
}

.reel.winning {
    animation: bounce 0.5s ease-in-out 3;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.slot-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.slot-controls input,
.crash-controls input {
    padding: 12px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    width: 150px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: bold;
}

.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.slot-result, .crash-result {
    text-align: center;
    font-size: 1.3em;
    min-height: 40px;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 20px;
}

.slot-result.win, .crash-result.win {
    background: rgba(74, 222, 128, 0.3);
    color: #4ade80;
    animation: flash 0.5s ease-in-out 3;
}

.slot-result.lose, .crash-result.lose {
    background: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.paytable {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.paytable h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.paytable-item {
    padding: 8px;
    text-align: center;
    font-size: 1.1em;
}

/* Crash Game Styles */
.crash-game {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

#crashChart {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.multiplier.crashed {
    color: #f87171;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) rotate(5deg); }
}

.crash-status {
    text-align: center;
    font-size: 1.3em;
    margin-top: 15px;
    font-weight: bold;
}

.crash-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.crash-history {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.crash-history h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.3em;
}

#historyList {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-item {
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
}

.history-item.low {
    background: rgba(248, 113, 113, 0.5);
}

.history-item.medium {
    background: rgba(251, 191, 36, 0.5);
}

.history-item.high {
    background: rgba(74, 222, 128, 0.5);
}

/* Stats Section */
.stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: none;
}

.stat-item {
    text-align: center;
    font-size: 1.3em;
}

.stat-item span:first-child {
    display: block;
    margin-bottom: 5px;
    opacity: 0.8;
}

.stat-item span:last-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #fbbf24;
}

/* Game Guides Section */
.game-guides {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.guide-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: none;
}

.guide-section h2 {
    color: #fbbf24;
    margin-bottom: 20px;
    font-size: 2em;
}

.guide-section h3 {
    color: #fff;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.guide-section h4 {
    color: #fbbf24;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.guide-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.guide-image {
    margin: 25px auto;
    text-align: center;
    max-width: 600px;
}

.guide-image img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(251, 191, 36, 0.3);
    display: block;
}

.guide-image figcaption {
    margin-top: 15px;
    color: #fbbf24;
    font-size: 1.05em;
    font-style: italic;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.strategy-table {
    margin: 25px 0;
    overflow-x: auto;
    width: 100%;
}

.strategy-table table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    table-layout: auto;
}

.strategy-table thead {
    background: rgba(251, 191, 36, 0.3);
}

.strategy-table th,
.strategy-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.strategy-table th {
    font-weight: bold;
    color: #fbbf24;
    font-size: 1.1em;
}

.strategy-table td {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
}

.strategy-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.tips-list li {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #fbbf24;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05em;
    line-height: 1.6;
}

.tips-list li strong {
    color: #fbbf24;
}

.betting-systems {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.system-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(251, 191, 36, 0.3);
    transition: all 0.3s;
}

.system-card:hover {
    transform: translateY(-5px);
    border-color: #fbbf24;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
}

.system-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1em;
    line-height: 1.8;
    margin: 0;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 40px 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border-top: 2px solid rgba(251, 191, 36, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fbbf24;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95em;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    margin: 0;
    line-height: 1.6;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 35px rgba(251, 191, 36, 0.7);
}

.scroll-top-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.scroll-top-btn span {
    animation: bounce-arrow 2s infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .footer {
        margin-top: 40px;
        padding: 25px 15px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-section {
        text-align: left;
    }
    
    .footer-section h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .footer-section p {
        font-size: 0.9em;
        line-height: 1.6;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links li {
        margin-bottom: 10px;
    }
    
    .footer-links a {
        font-size: 0.95em;
    }
    
    .footer-bottom {
        padding-top: 20px;
    }
    
    .footer-bottom p {
        font-size: 0.75em;
        line-height: 1.5;
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .header-subtitle {
        font-size: 1em;
        padding: 0 10px;
    }
    
    .balance-container {
        flex-direction: column;
        gap: 15px;
        font-size: 1.2em;
        padding: 15px 20px;
    }
    
    .btn-play-real {
        font-size: 1.1em;
        padding: 12px 30px;
    }
    
    .slot-section, .crash-section {
        padding: 15px;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .slot-machine {
        gap: 10px;
        padding: 20px 10px;
    }
    
    .reel {
        width: 90px;
        height: 90px;
        font-size: 3em;
    }
    
    .spin-symbol {
        width: 90px;
        height: 90px;
        font-size: 3em;
    }
    
    .slot-controls,
    .crash-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .slot-controls input,
    .crash-controls input {
        width: 100%;
        font-size: 1em;
    }
    
    .btn {
        width: 100%;
        font-size: 1em;
        padding: 12px 20px;
    }
    
    .paytable {
        font-size: 0.9em;
    }
    
    #crashChart {
        height: 200px;
    }
    
    .multiplier {
        font-size: 2.5em;
    }
    
    .crash-status {
        font-size: 1.1em;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        font-size: 1.1em;
    }
    
    .scroll-top-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.5em;
    }
    
    .guide-section {
        padding: 20px;
    }
    
    .guide-section h2 {
        font-size: 1.5em;
    }
    
    .guide-section h3 {
        font-size: 1.3em;
    }
    
    .guide-section p {
        font-size: 1em;
    }
    
    .strategy-table {
        font-size: 0.85em;
    }
    
    .strategy-table th,
    .strategy-table td {
        padding: 8px 5px;
    }
    
    .tips-list li {
        font-size: 0.95em;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .header-subtitle {
        font-size: 0.9em;
    }
    
    .balance-container {
        font-size: 1em;
    }
    
    .slot-machine {
        gap: 5px;
        padding: 15px 5px;
    }
    
    .reel {
        width: 70px;
        height: 70px;
        font-size: 2.5em;
    }
    
    .spin-symbol {
        width: 70px;
        height: 70px;
        font-size: 2.5em;
    }
    
    .multiplier {
        font-size: 2em;
    }
    
    .strategy-table th,
    .strategy-table td {
        padding: 6px 3px;
        font-size: 0.75em;
    }
}

/* Play for Real Button */
.btn-play-real {
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5);
    transition: all 0.3s;
    animation: glow 2s infinite;
}

.btn-play-real:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(251, 191, 36, 0.7);
}

@keyframes glow {
    0%, 100% { box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 6px 35px rgba(251, 191, 36, 0.8); }
}

