/* Define the .otf font */
@font-face {
    font-family: 'CustomFont';
    src: url('font.woff2') format('woff2'), /* Preferred format */
         url('font.otf') format('opentype'); /* Fallback for older browsers */
    font-display: swap;
}

@keyframes scaleIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Basic reset and styling */
body {
    margin: 0;
    font-family: 'CustomFont', sans-serif;
    user-select: none; /* Prevents selection of text */
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none; /* For Firefox */
    -ms-user-select: none; /* For IE/Edge */
    overflow: hidden; /* Prevents scrollbars from appearing */
}

.game-container {
  position: relative;
  background: radial-gradient(circle at center, #ebebeb 0%, #b8b8b8 100%);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    padding: 20px;
    width: 250px;
    height: 250px;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.8), 0 0 20px rgba(255, 20, 147, 0.8), 0 0 30px rgba(255, 20, 147, 0.8), 0 0 40px rgba(255, 20, 147, 0.8); 
    z-index: 1200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out; /* Apply the fade-in animation */
}

#game-over-popup {
    background-color: rgb(255, 255, 255, 0.4); 
    border-radius: 40px; /* Rounded corners */
    padding: 5px;
    width: 250px; /* Adjust width if needed */
    height: auto; /* Adjust height as needed */
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.4);
    z-index: 1200;
    animation: scaleIn 0.2s ease-out; /* Apply the scale-in animation */
}

.title, .scoretitle {
    font-family: 'CustomFont', sans-serif;
    
}

.title {
    font-size: 4.2em;
    margin-bottom: 5px;
    margin-top: 30px;
    color: #ffffff;
}

.endtitle {
    font-size: 3.4em;
    margin-bottom: 10px;
    color: #000000;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.8);
}

.scoretitle {
    font-size: 2em;
    margin-bottom: 20px;
    margin-top: 10px;
    color: #000000; 
}

.highscoretitle {
    font-size: 1.2em;
    margin-bottom: 15px;
    margin-top: 15px;
    color: #000000; 
}

/* Play Button Styling */
.play-button {
    padding: 6px 12px;
    font-size: 1.8em;
    color: #000;
    background-color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'CustomFont', sans-serif;
    margin-top: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite; /* Add the pulse animation */
}

.play-button:hover {
    background-color: #555;
}

.play-button:active {
    background-color: #333;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(2px);
}

/* rePlay Button Styling */
#replay-button {
    padding: 6px 12px;
    font-size: 1.8em;
    color: #ffffff;
    background-color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'CustomFont', sans-serif;
    transition: all 0.3s ease;
    animation: pulse 2s infinite; /* Add the pulse animation */
}

#home-button {
    padding: 4px 9px;
    margin-top: 20px;
    font-size: 1.23em;
    color: #ffffff;
    background-color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'CustomFont', sans-serif;
    transition: all 0.3s ease;
}

#home-button:hover {
    background-color: #555;
}

#home:active {
    background-color: #333;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(2px);
}

#replay-button:hover {
    background-color: #555;
}

#replay-button:active {
    background-color: #333;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(2px);
}

.game-container {
    display: none;
    background-color: rgb(246, 246, 246);
    background-size: cover; /* Make sure the texture covers the entire container */
    background-position: center;
    overflow: hidden;
}

/* Pulse animation */
.pulse {
    position: absolute;
    border-radius: 50%;
    background-color: transparent;
    animation: pulseAnimation 0.25s ease-out;
    z-index: 1000;
    border: 2px solid #fff;
}

.pulse.infinite {
    animation: pulseInfinite 1s ease-out infinite;
}

@keyframes pulseAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes pulseInfinite {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Define the pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

#score {
    position: absolute;
    top: 10px; /* Adjust top margin as needed */
    left: 50%;
    transform: translateX(-50%); /* Centers the element horizontally */
    font-family: 'CustomFont', cursive; 
    font-size: 24px; /* Adjust size */
    color: #000000; 
    text-shadow: 0 0 10px #ffffff, 0 0 20px #ffffff, 0 0 30px #ffffff, 0 0 40px #ffffff; /* Neon glow effect */
    z-index: 1100;
}

.hidden {
    visibility: hidden;
}

#loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid #dcdcdc;
    border-top: 8px solid #00ff00;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 2500;
    animation: spin 2s linear infinite;
    box-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff, 0 0 15px #ffffff, 0 0 20px #ffffff;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Container for the toggle switch and labels */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0; /* Adjust margin as needed */
    position: relative;
}

/* Toggle label styles */
.toggle-label {
    font-family: 'CustomFont', sans-serif;
    font-size: 1em;
    color: white;
    margin: 0 10px; /* Adjust spacing between labels and switch */
}

/* Toggle switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px; /* Smaller size */
    height: 20px; /* Smaller height */
    margin: 0 8px; /* Margin to separate from labels */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 20, 147, 0.8); /* Color of the slider */
    transition: .4s;
    border-radius: 15px; /* Rounded corners for the slider */
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px; /* Smaller size */
    width: 12px; /* Smaller size */
    border-radius: 50%;
    left: 4px; /* Adjust to center */
    bottom: 4px; /* Adjust to center */
    background-color: white;
    transition: .4s;
}

/* Move the slider to the right when checked */
input:checked + .slider {
    background-color: #00ff00; /* Color of the slider when checked */
}

input:checked + .slider:before {
    transform: translateX(30px); /* Adjust for smaller size */
}

/* Optional: Add a label for the toggle switch */
.switch:before {
    content: " ";
    position: absolute;
    display: block;
    background-color: #000;
    width: 50px; /* Matches the width of the switch */
    height: 20px; /* Matches the height of the switch */
    border-radius: 15px; /* Rounded corners */
}

.footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 10px;
    width: 100%;
    color: #939393;
}

.footer span {
    margin-right: 10px; /* Space between text and button */
}

.donate-button {
    display: inline-block;
    padding: 3px 7px;
    background-color: #0070ba; /* PayPal color */
    color: rgb(255, 255, 255);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px; /* Adjust size as needed */
}

.donate-button:hover {
    background-color: #005a9c; /* Darker shade on hover */
}

.link-no-style {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Match the color to surrounding text */
    transition: color 0.3s ease, text-decoration 0.3s ease; /* Smooth transition when styling changes */
}

.link-no-style:hover {
    color: #000000; /* Change color on hover (use your preferred color) */
}