* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffd93d;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --success-color: #6bcf7f;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header .tagline {
    font-size: 1.2rem;
    opacity: 0.95;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    animation: slideUp 0.5s ease-out;
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.card h3 {
    color: var(--dark-color);
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #ee5a5a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #45b8b0;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--dark-color);
}

.btn-accent:hover {
    background: #ffc700;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 217, 61, 0.4);
}

.btn-large {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.3rem;
    margin-top: 20px;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Radius Selector */
.radius-selector {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.radius-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
}

.radius-selector input[type="range"] {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

.radius-selector input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.radius-selector input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#radius-value {
    display: block;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Filters */
.filter-section {
    margin-top: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-checkbox:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox:has(input[type="checkbox"]:checked) {
    background: var(--primary-color);
    color: white;
}

.filter-checkbox input[type="checkbox"]:checked {
    accent-color: white;
}

/* Loading Screen */
#loading-screen {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.wheel-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 217, 61, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 107, 107, 0.6));
    }
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #ffd93d;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 8px solid white;
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--accent-color) 25%,
        var(--secondary-color) 50%,
        var(--primary-color) 75%,
        var(--accent-color) 100%);
    background-size: 400% 400%;
}

.wheel.spinning {
    animation: wheelSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite,
               gradientShift 3s ease infinite;
}

@keyframes wheelSpin {
    to { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Hide wheel segments - not needed anymore */
.wheel-segment,
.wheel-segment-content {
    display: none;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-screen h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: fadeInOut 2s ease-in-out infinite;
}

#loading-screen p {
    animation: fadeInOut 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Result Screen */
.result-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.6s ease-out;
}

.result-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h2 {
    margin: 0;
    font-size: 2rem;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.photo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.photo-gallery img:hover {
    transform: scale(1.05);
}

.place-info {
    padding: 30px;
}

.place-info h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.rating {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.rating .stars {
    color: #ffd93d;
    margin-right: 5px;
}

.address {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.info-item span {
    color: #666;
}

.hours-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.hours-section h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.hours-list {
    display: grid;
    gap: 8px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.hours-item.today {
    font-weight: 600;
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
}

/* Error Message */
.error-message {
    color: #ff6b6b;
    background: #ffe0e0;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-content ol {
    margin: 20px 0;
    padding-left: 20px;
}

.modal-content li {
    margin: 10px 0;
    line-height: 1.6;
}

.modal-content a {
    color: var(--secondary-color);
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    animation: fadeIn 1s ease-out;
}

.footer p {
    margin: 5px 0;
    font-size: 1rem;
}

.footer strong {
    font-weight: 700;
    font-size: 1.1rem;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    text-shadow: 0 0 10px var(--accent-color);
}

.footer-tagline {
    opacity: 0.85;
    font-size: 0.95rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: 20px;
    }

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

    .wheel-container {
        width: 150px;
        height: 150px;
    }

    .wheel-pointer {
        font-size: 1.5rem;
    }

    .result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .place-info h2 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* Quick Access "Find Near Me" Banner */
.quick-access-banner {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.quick-text {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-near-me-quick {
    background: white;
    color: #00b894;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-near-me-quick:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.btn-near-me-quick:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .quick-text {
        font-size: 1rem;
    }
    
    .btn-near-me-quick {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
