root { 
    display: block;
}

body{
    background-color: #000;
    background-repeat: repeat-x;
    background-position: top;   
}

*, *:before, *:after {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

input, input:before, input:after {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

::selection { background: transparent;color:inherit; }
::-moz-selection { background: transparent;color:inherit; }

#canvas{ 
    position: fixed; 
}

canvas {

	-ms-touch-action: none;
}

.ani_hack{
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* mobile webkit */
}

/***************FONTS*******************/
.check-fonts{
                position: fixed;
                opacity:0;
}

.check-font-1{
        font-family: 'impactregular';
}
.check-font-2{
        font-family: 'ds-digitalbold';
}
.check-font-3{
        font-family: 'motorwerkregular';
}
                
@font-face {
    font-family: 'impactregular';
    src: url('impact-webfont.eot');
    src: url('impact-webfont.eot?#iefix') format('embedded-opentype'),
         url('impact-webfont.woff2') format('woff2'),
         url('impact-webfont.woff') format('woff'),
         url('impact-webfont.ttf') format('truetype'),
         url('impact-webfont.svg#impactregular') format('svg');
    font-weight: normal;
    font-style: normal;

}


@font-face {
    font-family: 'ds-digitalbold';
    src: url('ds-digib-webfont.woff2') format('woff2'),
         url('ds-digib-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'motorwerkregular';
    src: url('motorwerkoblique-webfont.woff2') format('woff2'),
         url('motorwerkoblique-webfont.woff') format('woff'),
         url('motorwerkoblique-webfont.svg#motorwerkregular') format('svg');
    font-weight: normal;
    font-style: normal;

}

/***************MENU BUTTONS*******************/
.menu-buttons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.menu-button {
    position: absolute;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    z-index: 100;
}

.menu-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.menu-button:active {
    transform: scale(0.95);
}

.menu-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Play button - larger and centered */
.menu-button.play-btn {
    position: absolute;
    width: 250px;
    height: 70px;
    background: linear-gradient(135deg, #c1272d 0%, #e74c3c 50%, #c1272d 100%);
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 35px;
    padding: 0 40px;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    overflow: hidden;
    z-index: 101;
}

.menu-button.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.menu-button.play-btn:hover::before {
    left: 100%;
}

.menu-button.play-btn:hover {
    transform: translateX(-50%) scale(1.05);
    background: linear-gradient(135deg, #e74c3c 0%, #c1272d 50%, #e74c3c 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.menu-button.play-btn:active {
    transform: translateX(-50%) scale(0.98);
}


.menu-button.play-btn .button-text {
    font-family: 'impactregular', Arial, sans-serif;
    font-size: 32px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* Info button */
.menu-button.info-btn {
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* Fullscreen button */
.menu-button.fullscreen-btn {
    top: 20px;
    left: 90px;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

/* Audio button */
.menu-button.audio-btn {
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
}

.menu-button.audio-btn.muted {
    background: linear-gradient(135deg, #757575 0%, #424242 100%);
}

/* Exit button - used in game panels */
.menu-button.exit-btn {
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

/* Animation for buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 0 0 0 rgba(193, 39, 45, 0.7);
    }
    70% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 0 0 15px rgba(193, 39, 45, 0);
    }
    100% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 0 0 0 rgba(193, 39, 45, 0);
    }
}

@keyframes glow {
    0% {
        border-color: #fff;
    }
    50% {
        border-color: #ffeb3b;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 235, 59, 0.5);
    }
    100% {
        border-color: #fff;
    }
}

.menu-button.play-btn {
    animation: pulse 2.5s infinite, glow 3s infinite;
}

/***************INFO POPUP*******************/
.info-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.info-popup {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.info-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #ff4444;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.info-popup-close:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.info-popup-close svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.info-popup-logo {
    display: block;
    margin: 0 auto 30px;
    max-width: 200px;
    height: auto;
}

.info-popup-title {
    font-family: 'impactregular', Arial, sans-serif;
    font-size: 32px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.info-popup-content {
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #34495e;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-popup-footer {
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #bdc3c7;
}

/***************HORSE INFO POPUP*******************/
.info-popup h3 {
    color: #2c3e50;
    font-family: 'impactregular', Arial, sans-serif;
}

.info-popup strong {
    color: #2c3e50;
    font-weight: bold;
    display: inline-block;
    min-width: 140px;
}

.info-popup p {
    font-size: 16px;
    color: #34495e;
}

/* Horse stats section */
.horse-stats-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.horse-stats-section h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.stats-summary {
    font-size: 18px;
    color: #7f8c8d;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Progress bar */
.stats-bar-container {
    margin: 20px 0;
}

.stats-bar {
    display: flex;
    width: 100%;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stats-segment.wins {
    background: #c1272d;
}

.stats-segment.places {
    background: #2c3e50;
}

.stats-segment.others {
    background: #ecf0f1;
}

.percent-label {
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.stats-segment.others .percent-label {
    color: #7f8c8d;
    text-shadow: none;
}

/* Legend */
.stats-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #34495e;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-dot.wins {
    background: #c1272d;
}

.legend-dot.places {
    background: #2c3e50;
}

.legend-dot.others {
    background: #bdc3c7;
}

/***************HIPPODROME PANEL*******************/
.hippodrome-panel-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    pointer-events: all;
}

.hippodrome-title {
    text-align: center;
    margin-bottom: 30px;
}

.hippodrome-title h1 {
    font-family: 'impactregular', Arial, sans-serif;
    font-size: 42px;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hippodrome-title p {
    font-family: Arial, sans-serif;
    font-size: 20px;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hippodrome-buttons-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow-y: auto;
    padding: 10px;
}

.hippodrome-button {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: visible;
    min-height: 100px;
}

.hippodrome-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-color: #3498db;
}

.hippodrome-button:active {
    transform: translateY(-2px);
}

.hippodrome-image {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hippodrome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hippodrome-button:hover .hippodrome-image img {
    transform: scale(1.1);
}

.hippodrome-info {
    flex: 1;
    text-align: left;
}

.hippodrome-info h3 {
    font-family: 'impactregular', Arial, sans-serif;
    font-size: 22px;
    color: #fff;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.hippodrome-info p {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #bdc3c7;
    margin: 0;
}

.hippodrome-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hippodrome-arrow svg {
    width: 24px;
    height: 24px;
    fill: #ecf0f1;
    transition: transform 0.3s ease;
}

.hippodrome-button:hover .hippodrome-arrow svg {
    transform: translateX(5px);
}

/* Animation for buttons */
@keyframes slideInHippodrome {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hippodrome-button {
    animation: slideInHippodrome 0.5s ease forwards;
}

.hippodrome-button:nth-child(1) { animation-delay: 0.1s; }
.hippodrome-button:nth-child(2) { animation-delay: 0.2s; }
.hippodrome-button:nth-child(3) { animation-delay: 0.3s; }
.hippodrome-button:nth-child(4) { animation-delay: 0.4s; }
.hippodrome-button:nth-child(5) { animation-delay: 0.5s; }
.hippodrome-button:nth-child(6) { animation-delay: 0.6s; }
.hippodrome-button:nth-child(7) { animation-delay: 0.7s; }

/* Responsive design */
@media (max-width: 768px) {
    .hippodrome-buttons-container {
        grid-template-columns: 1fr;
    }
    
    .hippodrome-title h1 {
        font-size: 32px;
    }
    
    .hippodrome-info h3 {
        font-size: 18px;
    }
}
