/* Mobile-first core styles */
:root {
    --primary-color: #ff9800;
    --secondary-color: #ffb74d;
    --accent-color: #ffd180;
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #ff9800, #ffd180);
    --transition: all 0.3s ease;
    --forge-color: #3498db;
    --characters-color: #e74c3c;
    --gamevault-color: #2ecc71;
    --maps-color: #9b59b6;
    --mobile-padding: 16px;
    --mobile-card-height: 180px;
    --mobile-tap-target: 44px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    touch-action: manipulation; /* Better touch control */
}

a {
    text-decoration: none;
    color: inherit; /* Inherit color from parent */
}

html {
    font-size: 16px; /* Base font size */
    -webkit-text-size-adjust: 100%; /* Prevent auto text resize on iOS */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom); /* For devices with notches */
}

/* Improve scrolling on mobile */
#app {
    max-width: 100vw;
    min-height: 100vh;
    position: relative;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--mobile-padding);
    overflow-x: hidden;
}

h1 {
    font-size: 24px; /* Smaller heading for mobile */
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 16px;
    flex-grow: 1;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #666;
    padding: 0 var(--mobile-padding);
}

/* Page headers - optimized for mobile */
.page-header {
    display: flex;
    justify-content: space-between; /* Change to space-between to move title right */
    align-items: center;
    margin-bottom: 6px;
    position: relative;
}

.page-header h2 {
    margin: 0; /* Remove auto margin that was centering the title */
    text-align: left; /* Align text to the left */
    padding-left: 16px; /* Add some padding to the left of the title */
}

/* Improved back button styling */
.back-button {
    background: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #444;
    /* padding: 10px 18px; */
    border-radius: 30px;
    transition: all 0.2s ease;
    min-height: var(--mobile-tap-target);
    min-width: var(--mobile-tap-target);
    display: flex;
    align-items: center;
    justify-content: center;
    /* gap: 6px; */
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

/* Remove the arrow from the ::before pseudo-element */
.back-button::before {
    content: ""; /* Remove the arrow character */
    /* Keep other styles for spacing */
    margin-right: 0;
}

/* Adjust positioning for back button */
.page-header .back-button {
    position: absolute; /* Change from absolute to relative */
    left: auto; /* Remove absolute positioning */
    z-index: 2;
}

/* For special pages that need a more prominent back button */
#forge-page .back-button,
#category-page .back-button,
#character-detail-page .back-button {
    margin: 12px 0 20px 2px;
}

/* Home Page Styles - Mobile first */
.options-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 16px;
}

/* Tablet breakpoint - disabled */
@media (min-width: 768px) and (max-width: 767px) {
    /* This media query will never apply because of contradicting conditions */
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 1.05rem;
    }
}

/* Desktop breakpoint - disabled */
@media (min-width: 992px) and (max-width: 991px) {
    /* This media query will never apply because of contradicting conditions */
    .options-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 24px;
    }
}

/* Alternating card layout styles */
.option-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

/* Default layout - image on left */
.card-character {
    width: 40%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    order: 1; /* Left side by default */
}

.card-content {
    width: 60%;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-between;
    order: 2; /* Right side by default */
}

/* Even card layout - image on right */
.card-even .card-character {
    order: 2; /* Move to right side */
}

.card-even .card-content {
    order: 1; /* Move to left side */
}

.card-character img {
    max-height: 100%;
    width: 100%;
    object-fit: contain;
}

/* Make button text smaller to fit better */
.card-content .option-button {
    font-size: 0.9rem;
    padding: 6px 16px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Ensure proper padding on option-button */
.option-button {
    padding: 8px 20px;
    margin-top: auto; /* Push button to bottom of flex container */
}

/* Make sure option icon doesn't push other elements down too much */
.option-icon {
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

.option-icon::after {
    content: '';
    position: absolute;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    z-index: -1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.option-card:active {
    transform: scale(0.98); /* Quick feedback on touch */
}

/* Hover effects for non-touch devices */
@media (hover: hover) {
    .option-card:hover {
        transform: translateY(-5px);
    }
    
    .option-card:hover::before {
        opacity: 1;
    }
}

/* Custom colors for each section */
.option-card[data-route="forge"]::before,
.option-card[data-route="clothing"]::before,
.option-card[data-route="heads"]::before,
.option-card[data-route="accessories"]::before,
.option-card[data-route="animation"]::before {
    background: linear-gradient(135deg, var(--forge-color), #74b9ff);
}

.option-card[data-route="characters"]::before,
.option-card[data-route="zone"]::before,
.option-card[data-route="level"]::before,
.option-card[data-route="age"]::before,
.option-card[data-route="playtime"]::before {
    background: linear-gradient(135deg, var(--characters-color), #ff7675);
}

.option-card[data-route="gamevault"]::before,
.option-card[data-route="spin-win"]::before,
.option-card[data-route="scratch-card"]::before,
.option-card[data-route="robux-calc"]::before {
    background: linear-gradient(135deg, var(--gamevault-color), #7bed9f);
}

.option-card[data-route="maps"]::before {
    background: linear-gradient(135deg, var(--maps-color), #a29bfe);
}

.option-card h2 {
    font-size: 1.3rem;
}

.option-card p {
    color: #666;
}

.option-button {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: var(--mobile-tap-target);
    width: 100%; /* Full width buttons for better tapping */
    max-width: 180px;
    margin: 0 auto;
}

.option-card[data-route="forge"] .option-button,
.option-card[data-route="clothing"] .option-button,
.option-card[data-route="heads"] .option-button,
.option-card[data-route="accessories"] .option-button,
.option-card[data-route="animation"] .option-button {
    background: linear-gradient(135deg, var(--forge-color), #74b9ff);
}

.option-card[data-route="characters"] .option-button,
.option-card[data-route="zone"] .option-button,
.option-card[data-route="level"] .option-button,
.option-card[data-route="age"] .option-button,
.option-card[data-route="playtime"] .option-button {
    background: linear-gradient(135deg, var(--characters-color), #ff7675);
}

.option-card[data-route="gamevault"] .option-button,
.option-card[data-route="spin-win"] .option-button,
.option-card[data-route="scratch-card"] .option-button,
.option-card[data-route="robux-calc"] .option-button {
    background: linear-gradient(135deg, var(--gamevault-color), #7bed9f);
}

.option-card[data-route="maps"] .option-button {
    background: linear-gradient(135deg, var(--maps-color), #a29bfe);
}

.option-button:active {
    transform: scale(0.95); /* Immediate touch feedback */
}

/* Page transition styles - optimized for mobile */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow-x: hidden;
    transform: translateY(20px);
}

.page.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
    height: auto;
    transform: translateY(0);
}

/* Maps grid styles - mobile optimized */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Smaller for mobile */
    gap: 12px;
    margin-top: 16px;
}

.map-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.map-card:active {
    transform: scale(0.98); /* Touch feedback */
}

.map-image {
    width: 100%;
    height: 120px; /* Smaller height for mobile */
    object-fit: cover;
}

.map-info {
    padding: 12px;
}

.map-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Items grid styles - mobile optimized */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.item-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    height: 180px; /* Optimal size for mobile */
    display: flex;
    flex-direction: column;
}

.item-card:active {
    transform: scale(0.98); /* Touch feedback */
}

.item-image-wrapper {
    height: 120px; /* Smaller for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    transition: transform 0.3s ease;
}

.item-info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-info h3 {
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Item detail page styles - mobile optimized */
.item-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.item-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
    min-height: 240px; /* Shorter for mobile */
    background: #f8f9fa;
}

#item-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.item-info h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.item-info p {
    margin-bottom: 18px;
    color: #666;
    line-height: 1.5;
}

/* Username verification form - mobile optimized */
.username-form {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.input-container {
    margin: 18px 0;
    position: relative;
}

.form-input {
    width: 100%;
    font-size: 1rem;
    padding: 14px 16px; /* Larger for touch input */
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.platform-selection {
    margin: 24px 0;
}

.platform-selection h3 {
    margin-bottom: 14px;
}

.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.option-item {
    background: #f4f4f4;
    border-radius: 12px;
    padding: 14px 10px; /* Taller for better touch */
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e0e0e0;
    text-align: center;
    color: #888;
    font-weight: 500;
    min-height: var(--mobile-tap-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-item.selected {
    border-color: var(--primary-color);
    background: #fffbe7;
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.08);
}

.option-item:active {
    background: #e0e0e0;
    transform: scale(0.97);
}

.primary-button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 14px 32px; /* Taller for mobile tap */
    border-radius: 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    min-height: var(--mobile-tap-target);
}

.primary-button:active {
    transform: scale(0.97);
}

/* Flow styles - mobile optimized */
.flow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#back-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.95));
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
}

#back-button::before {
    margin-right: 0;
    font-size: 1.4rem;
}

.progress-indicator {
    font-weight: 500;
    color: #666;
}

.flow-footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-bottom: 20px; /* Extra padding for mobile */
}

/* Modal styles - mobile optimized */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 0 16px; /* Add padding for small screens */
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    max-width: 90%;
    width: 360px;
    animation: scaleUp 0.3s ease;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

@keyframes scaleUp {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* Character grid styles - mobile optimized */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.character-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 220px; /* Shorter on mobile */
}

.character-card:active {
    transform: scale(0.98);
}

.character-image-wrapper {
    height: 160px; /* Shorter for mobile */
    overflow: hidden;
    position: relative;
    background: #f1f1f1;
}

.character-image {
    width: 100%;
}

.character-image>img {
    max-width: 100%;
    height: 100px;
    vertical-align: middle;
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: center;


}

.character-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.character-info h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.character-info p {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.character-tag {
    display: inline-block;
    background: #f2f2f2;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #666;
    margin-top: auto;
    text-transform: capitalize;
}

.pro-tag {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
}

.fun-tag {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

.chill-tag {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.dynamic-tag {
    background-color: rgba(155, 89, 182, 0.2);
    color: #8e44ad;
}

/* Request options - mobile optimized */
.request-option-container {
    margin: 18px 0;
}

.request-option-container h3 {
    margin-bottom: 14px;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* RobuxCalc styles - mobile optimized */
.calc-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
    max-width: 800px;
}

.calc-form {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    flex: 1;
}

.calc-results {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    flex: 1;
    display: none;
}

.calc-results.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Improved range inputs for mobile */
.input-group input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    height: 8px; /* Thicker for mobile */
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px; /* Larger for mobile */
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.range-value {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.result-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-color);
}

.result-amount {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--primary-color);
    text-align: center;
}

.result-breakdown {
    margin-top: 18px;
    border-top: 1px solid #eee;
    padding-top: 18px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.breakdown-label {
    font-weight: 500;
}

.verify-prompt {
    margin-top: 24px;
    text-align: center;
}

.verify-prompt p {
    margin-bottom: 14px;
    color: #666;
}

/* Spin wheel mobile optimizations */
.spin-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin: 16px auto;
    background: linear-gradient(135deg, #fff3e0 0%, #fffcf7 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.3);
    position: relative;
    max-width: 340px; /* Slightly smaller for mobile */
    overflow: hidden;
}

.spin-wheel-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    margin: 10px auto;
}

.center-button {
    position: absolute;
    width: 70px;
    height: 70px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff9800 0%, #ffd180 100%);
    border: 5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2), inset 0 -4px 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    min-width: var(--mobile-tap-target);
    min-height: var(--mobile-tap-target);
}

.center-button:active {
    transform: translate(-50%, -50%) scale(0.95);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

/* Improved Spin Wheel Styles for Mobile */
.spin-wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin: 16px auto 24px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 340px;
    overflow: hidden;
}

.spin-wheel-title {
    font-size: 1.3rem;
    margin: 0 0 16px;
    text-align: center;
    color: #333;
    font-weight: 600;
}

.spin-wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto;
}

.wheel-outer-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #ff9800;
    box-sizing: border-box;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.wheel-inner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25%;
    height: 25%;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.wheel-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10%;
    height: 10%;
    border-radius: 50%;
    background: #ff9800;
    z-index: 4;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.spin-wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.wheel-slice {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 50%;
    transform-origin: 0% 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.slice-label {
    position: relative;
    margin-top: 25px;
    padding-left: 30px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: #ff9800;
    color: white;
    border: 4px solid white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.spin-button:hover {
    background: #ff5722;
}

.spin-button:active, .spin-button.spinning {
    transform: translate(-50%, -50%) scale(0.95);
    background: #e65100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.spins-left {
    font-size: 1rem;
    margin-top: 16px;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.spin-result {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: slideUpFadeIn 0.5s forwards;
    width: 90%;
    max-width: 300px;
}

.spin-result h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.3rem;
}

.spin-result p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.prize-amount {
    color: #ff5722;
    font-weight: bold;
    font-size: 1.2em;
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: fall 3s linear infinite;
    top: -10px;
}

@keyframes fall {
    0% {
        top: -10px;
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 100%;
        transform: translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .spin-wheel-container {
        padding: 12px;
        margin: 10px auto 16px;
    }
    
    .spin-wheel-wrapper {
        max-width: 280px;
    }
    
    .spin-button {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }
    
    .slice-label {
        font-size: 0.9rem;
        margin-top: 20px;
    }
    
    .wheel-outer-border {
        border-width: 4px;
    }
}

/* High-DPI screen optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .wheel-slice {
        will-change: transform;
    }
    
    .spin-wheel {
        will-change: transform;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .spin-button {
        -webkit-tap-highlight-color: transparent;
    }
    
    .spin-button:active {
        background: #e65100;
    }
}

/* Add this to improve scrolling on iOS */
*::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Hack to prevent pull-to-refresh on iOS without affecting user experience */
html {
    overscroll-behavior-y: contain;
}

/* Add iOS-specific styles for inputs and buttons */
input, button {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
}

/* Active state feedback for all interactive elements */
button:active, .option-card:active, .map-card:active,
.item-card:active, .character-card:active, .option-item:active {
    transform: scale(0.97);
}

/* Animation optimizations for mobile (reduce CPU usage) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Additional animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Player Type, Skill Level, Age Group & Play Time styles */
.player-type-option,
.skill-level-option,
.age-group-option,
.play-time-option {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 80px;
}

.player-type-option.selected,
.skill-level-option.selected,
.age-group-option.selected,
.play-time-option.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.player-type-option:active,
.skill-level-option:active,
.age-group-option:active,
.play-time-option:active {
    transform: scale(0.95);
}
