/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jersey 20', system-ui, sans-serif;
}

/* Layout */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.bg-gradient {
    background: linear-gradient(to bottom right, #1a1a2e, #16213e);
}

/* Width and Padding */
.w-full {
    width: 100%;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

/* Typography */
.title {
    color: #ff2e63;
    font-size: 3.75rem;
    margin-bottom: 3rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-white {
    color: white;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.8);
}

.text-cyan {
    color: #00d4ff;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

/* Forms and Inputs */
.flex-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 640px) {
    .flex-form {
        flex-direction: row;
    }
}

.input-field {
    width: 100%;
    max-width: 16rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #ff2e63;
    background-color: rgba(255, 255, 255, 0.15);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.search-button,
.primary-button,
.share-button {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #ff2e63;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-button:hover,
.primary-button:hover,
.share-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.share-button {
    padding: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
}

.share-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.feedback-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.feedback-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Grid Layout */
.grid-container {
    display: grid;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mood Sliders */
.mood-slider {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mood-name {
    width: 6rem;
    text-align: left;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.slider {
    flex: 1;
    height: 0.5rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background-color: #ff2e63;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.mood-value {
    width: 3rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Artist Image Container and Overlay */
#artistImageContainer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
    will-change: background-image;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.3) 25%,
        rgba(0, 0, 0, 0.60) 75%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Rating Page Content */
.rating-page-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

/* Share buttons container */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Error message */
.error-message {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Utility classes */
.hidden {
    display: none;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.opacity-30 {
    opacity: 0.3;
}

/* Spacing utilities */
.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.my-12 {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Hover effects */
.hover\:text-cyan-300:hover {
    color: #67e8f9;
}

/* Base styles remain the same until the responsive updates */

/* Responsive Typography */
.title {
    color: #ff2e63;
    font-size: clamp(2rem, 5vw, 3.75rem); /* Responsive font size */
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-3xl {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    line-height: 1.2;
}

.text-xl {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.4;
}

/* Responsive Padding */
.p-4 {
    padding: clamp(0.5rem, 2vw, 1rem);
}

.p-8 {
    padding: clamp(1rem, 4vw, 2rem);
}

/* Responsive Form */
.flex-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.input-field {
    width: 100%;
    max-width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem);
}

@media (min-width: 640px) {
    .flex-form {
        flex-direction: row;
        padding: 0;
    }

    .input-field {
        max-width: 16rem;
    }
}

/* Responsive Grid Layout */
.grid-container {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
    margin: clamp(1rem, 3vw, 2rem) auto;
    width: 95%;
    max-width: 1200px;
}

@media (max-width: 767px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .mood-slider {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem;
    }

    .mood-name {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .mood-value {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Mood Sliders */
.mood-slider {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

/* Responsive Buttons */
.search-button,
.primary-button {
    padding: clamp(0.75rem, 2vw, 1rem);
    width: 100%;
    max-width: 200px;
}

.share-button {
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
}

/* Responsive Share Buttons */
.share-buttons {
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
}

/* Mobile-specific styles */
@media (max-width: 480px) {
    .title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .grid-container {
        padding: 1rem;
    }

    .share-buttons {
        justify-content: space-around;
    }

    .mood-slider {
        margin-bottom: 1rem;
    }

    .slider {
        height: 8px;
    }

    .slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
}

/* Tablet-specific styles */
@media (min-width: 481px) and (max-width: 1024px) {
    .grid-container {
        width: 90%;
    }

    .mood-slider {
        padding: 1rem;
    }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .grid-container {
        gap: 1rem;
        padding: 1rem;
    }

    .mood-slider {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* High-resolution screens */
@media (min-width: 1920px) {
    .grid-container {
        max-width: 1400px;
    }

    .title {
        font-size: 4rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .input-field {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .mood-slider {
        background: rgba(0, 0, 0, 0.4);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .share-buttons,
    .search-button,
    .primary-button {
        display: none;
    }
}

/* Ensure content is accessible on very small screens */
@media (max-width: 320px) {
    .title {
        font-size: 1.5rem;
    }

    .input-field,
    .search-button,
    .primary-button {
        padding: 0.5rem;
    }

    .mood-slider {
        padding: 0.5rem;
    }
}

/* Fix for notched phones */
@supports (padding: max(0px)) {
    .rating-page-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}


/* Footer styles */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.footer-text {
    color: #ffffff;  /* Changed to solid white */
    font-size: 0.875rem;
}

.footer-link {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ff2e63;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer {
        padding: 0.75rem;
    }
    
    .footer-text {
        font-size: 0.75rem;
    }
}
