/* Base styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    background-image: var(--background-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding-bottom: 60px; /* Adjust for footer */
}

.banner-container {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.banner-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    margin: 0 auto;
    display: block;
}

.banner-text {
    margin-top: 10px;
    font-size: 1.2em;
    color: #333;
    padding: 0 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.wheel-container {
    position: relative;
    width: 600px;
    margin: 0 auto;
}

#wheel-canvas {
    width: 600px;
    height: 600px;
    display: block;
    margin: 0 auto;
}

.spin-button-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.spin-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
    transform-origin: center;
}

.spin-btn:hover {
    transform: scale(1.1);
    animation: none;
}

.spin-btn:active {
    transform: scale(0.95);
}

.spin-image {
    width: 120px;  /* Adjust size as needed */
    height: 120px;  /* Adjust size as needed */
    object-fit: contain;
}

/* Footer Styles */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 8px 0;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 5px;
    width: 25%;
}

.footer-icon {
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.footer-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.footer-icon i {
    font-size: 24px;
    color: {{ admin_settings.footer_text_color }};
}

.footer-item span {
    font-size: 18px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .footer-icon {
        height: 36px;
        width: 36px;
    }
    
    .footer-icon img {
        width: 36px;
        height: 36px;
    }
    
    .footer-icon i {
        font-size: 20px;
    }
    
    .footer-item span {
        font-size: 11px;
    }
}

/* Prize Notification Styles */
.prize-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.prize-notification.show {
    top: 20px;
}

/* Animations */
@keyframes slideIn {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, -100%); opacity: 0; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Media Queries */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .game-container {
        overflow-x: hidden;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0;
    }

    .wheel-container {
        position: relative;
        width: 80vw;
        height: 80vw;
        margin: 0 auto;
    }

    #wheel-canvas {
        width: 100%;
        height: 100%;
        display: block;
        margin: 0 auto;
    }

    .spin-button-container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 100;
    }

    .spin-image {
        width: 20vw;  /* 20% of viewport width */
        height: 20vw;
        max-width: 100px;
        max-height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .wheel-container {
        width: 90vw;
        height: 90vw;
    }

    .spin-image {
        width: 25vw;  /* Slightly larger for smaller screens */
        height: 25vw;
        max-width: 80px;
        max-height: 80px;
    }
}

.game-container {
    display: flex;
    top: 20px;
    justify-content: center;
    align-items: center;
}

.wheel-container {
    position: relative;
    width: 600px;
    margin: 0 auto;
}

#wheel-canvas {
    display: block;
    margin: 0 auto;
}

.spin-button-container {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#spin-button:hover {
    transform: scale(1.1);
    /*box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);*/
}

#spin-button:active {
    transform: scale(0.95);
}

#spin-button:disabled {
    /*background-color: #cccccc;*/
    cursor: not-allowed;
    animation: none;
}

/* iOS-style notification banner */
.prize-notification {
    position: fixed;
    top: -100px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.prize-notification.show {
    top: 20px;
}

/* Add padding to main content to prevent footer overlap */
main {
    padding-bottom: 70px; /* Adjust based on footer height */
}

/* iOS Modal Styles */
.ios-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.ios-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ios-modal-content {
    padding: 24px;
}

.ios-modal h2 {
    margin: 0 0 20px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.ios-input-group {
    margin-bottom: 24px;
}

.ios-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(242, 242, 242, 0.95);
    outline: none;
    box-sizing: border-box;
}

.ios-input-group input:focus {
    border-color: #007AFF;
}

.ios-button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.ios-button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Canvas styles */
#canvas {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
    position: relative;
}

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
    .wheel-container {
        padding: 20px;
        /*min-height: calc(100vh - 40px); /* Account for padding */
    }
    
    #canvas {
        width: 90%; /* Slightly smaller to prevent edge cutting */
        max-width: 380px; /* Adjusted to prevent edge cutting */
        margin: 20px auto;
    }
    
    /* Center the power controls */
    .power-controls {
        text-align: center;
        width: 100%;
        margin: 10px auto;
    }
}

@media screen and (max-width: 480px) {
    .wheel-container {
        padding: 15px;
    }
    
    #canvas {
        width: 85%; /* Even smaller width ratio for mobile */
        max-width: 280px; /* Smaller size for mobile phones */
        margin: 15px auto;
    }
}

/* Ensure the wheel doesn't overflow */
canvas {
    max-width: 100%;
    height: auto !important; /* Force aspect ratio */
    border-radius: 50%; /* Optional: if you want to ensure perfect circle */
}

/* Add these helper classes */
.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-width {
    width: 100%;
}

.filter-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-section .form-label {
    font-weight: 500;
    color: #495057;
}

.filter-section .btn {
    padding: 8px 16px;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .filter-section .col-md-4 {
        margin-bottom: 15px;
    }
    
    .filter-section .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

.filter-section input::placeholder {
    color: #adb5bd;
    font-size: 0.9em;
}

.filter-section .col-md-3 {
    padding: 0 10px;
}

@media (max-width: 768px) {
    .filter-section .col-md-3 {
        padding: 0 15px;
        margin-bottom: 15px;
    }
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .wheel-container {
        width: 400px;
        height: 400px;
    }
    
    #wheel-canvas {
        width: 100%;
        height: 100%;
    }
}

@media screen and (max-width: 480px) {
    .wheel-container {
        width: 400px;
        height: 400px;
    }
}

.wheel-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

#wheel-canvas {
    width: 600px;
    height: 600px;
}

.winners-container {
    position: fixed;
    right: 20px;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    color: white;
    width: 280px;
    z-index: 1000;
}

.winners-header {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
}

.winners-list {
    height: 90px; /* Show 3 items */
    overflow: hidden;
    position: relative;
}

.winners-scroll {
    animation: scrollUp 15s linear infinite;
}

.winner-item {
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
}

.winner-id {
    color: #ffd700;
}

.winner-amount {
    color: #00ff00;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

@media (max-width: 768px) {
    .winners-container {
        position: static;
        margin: 20px auto;
        width: 90%;
        max-width: 280px;
    }
}

.history-container {
    position: fixed;
    left: 20px;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    color: white;
    width: 320px;
    z-index: 1000;
}

.history-header {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
}

.history-list {
    height: 90px; /* Show 3 items */
    overflow: hidden;
    position: relative;
}

.history-scroll {
    animation: scrollUp 15s linear infinite;
}

.history-item {
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
}

.history-date {
    color: #87CEEB;
    min-width: 75px;
}

.history-time {
    color: #FFB6C1;
    min-width: 60px;
}

.history-amount {
    color: #00ff00;
    min-width: 70px;
    text-align: right;
}

@media (max-width: 768px) {
    .history-container {
        position: static;
        margin: 20px auto;
        width: 90%;
        max-width: 320px;
    }
}

@media (max-width: 767px) {
    body {
        background-image: var(--mobile-background-image);
    }
}

.site-header {
    width: 100%;
    text-align: center;
    padding: 20px 0;
}

.site-header h1 {
    color: var(--header-title-color);
    margin: 0;
    text-align: center;
    width: 100%;
}

.section-title {
    text-align: center;
    width: 100%;
    margin: 0px 0;
    color: var(--header-title-color) !important;
}

@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }
    
    .site-header h1 {
        font-size: 1.5em;
    }
}

.banner-text {
    color: var(--banner-text-color);
}

.wheel-container canvas {
    border: 2px solid var(--wheel-border-color);
    border-radius: 50%;
}

.ios-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 13px;
    width: 270px;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ios-alert-title {
    padding: 18px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ios-alert-message {
    padding: 16px;
    font-size: 13px;
    text-align: center;
    color: #666;
}

.ios-alert-button {
    padding: 16px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #007AFF;
    cursor: pointer;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ios-alert-button:hover {
    background: rgba(0, 0, 0, 0.03);
}

.ios-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    display: none;
}

.ios-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
    max-width: 90%;
    text-align: center;
    pointer-events: none;
}

.ios-notification.error {
    background: rgba(255, 59, 48, 0.9);
}

.field-manual_status {
    font-weight: bold;
}
