/* Basic Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Disable tap highlight on mobile */
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevents scrolling */
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #2c3e50; /* Darker Background - Midnight Blue */
    color: #ecf0f1; /* Light text color */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px; /* Reduced padding for more screen space */
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-around; /* Distribute space */
    align-items: center;
    gap: 15px; /* Adjusted gap */
}

/* Spinner Assembly (Wheel + Arrow) */
.spinner-assembly {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Increased size: Responsive width, vmin ensures it fits viewport nicely */
    width: clamp(300px, 85vmin, 450px); 
    height: clamp(300px, 85vmin, 450px);
}

.spinner-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #bdc3c7; /* Silver border */
    box-shadow: 0 0 15px rgba(0,0,0,0.3), inset 0 0 10px rgba(0,0,0,0.2);
    /* Conic gradient will be set by JS */
    transition: transform var(--spin-duration, 4s) cubic-bezier(0.25, 0.1, 0.25, 1); 
    position: relative; 
}

.spinner-arrow {
    width: 0;
    height: 0;
    /* Arrow pointing UP */
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid #e74c3c; 
    position: absolute;
    top: -10px; 
    left: 50%;
    transform: translateX(-50%); 
    z-index: 10;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.5));
}

/* Result Display */
.result-display {
    font-size: clamp(1.4rem, 4.5vw, 2rem); 
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    padding: 10px 20px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
    text-align: center;
    min-height: 55px; 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%; 
    max-width: 350px;
}

/* Spin Button Styling */
.spin-button {
    padding: 20px 40px; 
    font-size: clamp(1.4rem, 5.5vw, 2rem); 
    font-weight: bold;
    border-radius: 20px; 
    border: 3px solid #ecf0f1; 
    cursor: pointer;
    background-color: #3498db; 
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
    transition: background-color 0.2s ease-in-out, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.spin-button:hover:not(:disabled) {
    background-color: #2980b9; 
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

.spin-button:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.spin-button:disabled {
    background-color: #95a5a6; 
    cursor: not-allowed;
    opacity: 0.7;
}