/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10000;
    transition: opacity 0.8s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide body content initially until loading screen is removed */
body:not(.loaded) .app-container {
    opacity: 0;
    visibility: hidden;
}

body.loaded .app-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in;
}

/* Base Styles for Apple Music Request Beta - Lookup Version */
:root {
    --primary: #2d46b9;
    --secondary: #6c4bd1;
    --dark: #1a1a2e;
    --light: #f1f1f1;
    --success: #4caf50;
    --error: #f44336;
    --gray: #888;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-green: #00ff00;
    --neon-purple: #9d00ff;
    --neon-yellow: #ffff00;
    --icon-bg: #5e17eb;
    --apple-music-red: #FA2D48;
    --apple-music-gradient: linear-gradient(135deg, #FA2D48, #FF6B35);
}

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


body {
    font-family: 'Roboto', sans-serif;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    background: url('../assets/img/request.jpg') no-repeat center center fixed;
    background-size: cover;
}


.app-container {
    width: 100%;
    max-width: 1000px;
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    margin-top: 30px;
}

/* Event Header */
.event-header {
    background: linear-gradient(145deg,
            var(--primary),
            var(--secondary),
            var(--primary),
            var(--secondary));
    background-size: 400% 400%;
    padding: 15px 5px 5px 5px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: gradientAnimation 15s ease infinite;
    border-radius: 20px 20px 0 0;
}

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

.event-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
}

.event-date {
    font-size: 16px;
    opacity: 0.8;
    position: relative;
}

.event-code {
    background-color: rgba(0, 0, 0, 0.15);
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    margin-top: 10px;
    position: relative;
}

/* Apple Music Logo */
.apple-music-logo {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    opacity: 0.8;
}

.apple-music-logo .fa-apple {
    color: var(--apple-music-red);
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding: 60px 30px 15px 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 30px;
    position: relative;
}

/* Ensure consistent spacing between name field and REQUEST SONG button to match search-to-name spacing */
.form-group.name-input {
    margin-bottom: 30px; /* Desktop: matches the search field margin-bottom */
}

.form-label {
    display: none;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

/* Input Group Styles */
.input-group {
    display: flex;
    box-shadow: none;
    border-radius: 12px;
    position: relative;
    height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
    background: transparent;
}

.input-group-text {
    background: var(--icon-bg);
    color: white;
    border: none;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    border-radius: 12px 0 0 12px;
    position: relative;
    z-index: 1;
    margin-right: 0;
}

.input-group-text i {
    font-size: 1.4rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control {
    width: 100%;
    background: rgba(30, 30, 50, 0.6);
    border: none;
    border-radius: 0 12px 12px 0;
    padding: 18px;
    color: rgba(255, 255, 255, 1);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
    font-size: 18px;
    flex: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    padding-right: 18px; /* Default padding when no clear button */
}

/* When clear button is visible, add padding but preserve border radius */
.input-group:has(.clear-input[style*="display: block"]) .form-control,
.input-group:has(.clear-input[style*="display: flex"]) .form-control,
.input-group.has-clear-button .form-control {
    padding-right: 60px !important; /* Make room for internal clear button */
}

.input-group:has(.clear-input[style*="display: block"]) .form-control:focus,
.input-group:has(.clear-input[style*="display: flex"]) .form-control:focus,
.input-group.has-clear-button .form-control:focus {
    border-radius: 0 12px 12px 0 !important; /* Preserve border radius */
}

.form-control:focus {
    outline: none;
    background-color: rgba(30, 30, 50, 0.8);
    box-shadow: none;
    border-radius: 0 12px 12px 0;
}


.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Song-Artist Row Layout */
.song-artist-row {
    display: flex;
    gap: 10px;
}

.song-input,
.artist-input {
    flex: 1;
}

/* Submit Button */
@property --a {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes a {
    to {
        --a: 1turn;
    }
}

.submit-btn {
    position: relative;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 2px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: conic-gradient(in hsl longer hue from var(--a),
        hsl(180 100% 50%) 0%,
        hsl(300 100% 50%) 50%,
        hsl(180 100% 50%) 100%);
    animation: a 6s infinite linear;
    /* iOS specific fixes */
    -webkit-appearance: none;
    -webkit-border-radius: 12px;
    box-shadow: none;
    outline: none;
    -webkit-box-shadow: none;
    overflow: hidden;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.submit-btn::after {
    content: '';
    position: absolute;
    inset: 2px;
    z-index: -1;
    border-radius: 10px;
    background: conic-gradient(in hsl longer hue from var(--a),
        hsl(180 100% 50%) 0%,
        hsl(300 100% 50%) 50%,
        hsl(180 100% 50%) 100%);
    animation: a 6s infinite linear;
    filter: blur(6px);
}

.btn-content {
    position: relative;
    z-index: 1;
    width: 100%;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    border-radius: 10px;
    padding: 18px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 18px;
    backdrop-filter: blur(40px);
    /* iOS specific fixes */
    -webkit-border-radius: 10px;
    box-shadow: none;
    -webkit-box-shadow: none;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.submit-btn:hover .btn-content {
    background: linear-gradient(145deg, #3d5ac7, #7a5dd9);
}

.submit-btn i {
    font-size: 22px;
}


/* FIND EVENT Button Error State - OVERRIDE CONIC GRADIENT - UNIQUE SELECTOR */
.message.error + form .submit-btn.find-event-btn,
.code-form .message.error ~ form .submit-btn.find-event-btn,
.code-form .message.error ~ form .find-event-btn {
    background: #6c4bd1 !important;
    background-image: none !important;
    animation: none !important;
    border: 2px solid #6c4bd1 !important;
    cursor: pointer !important;
    padding: 18px !important;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(108, 75, 209, 0.3) !important;
    opacity: 1 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    /* Override all conic gradient properties */
    --a: 0deg !important;
}

.message.error + form .submit-btn.find-event-btn::after,
.code-form .message.error ~ form .submit-btn.find-event-btn::after,
.code-form .message.error ~ form .find-event-btn::after {
    display: none !important;
    background: none !important;
    animation: none !important;
}

.message.error + form .submit-btn.find-event-btn .btn-content,
.code-form .message.error ~ form .submit-btn.find-event-btn .btn-content,
.code-form .message.error ~ form .find-event-btn .btn-content {
    background: #6c4bd1 !important;
    background-image: none !important;
}

.message.error + form .submit-btn.find-event-btn:hover,
.code-form .message.error ~ form .submit-btn.find-event-btn:hover,
.code-form .message.error ~ form .find-event-btn:hover {
    background: #5e17eb !important;
    background-image: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(94, 23, 235, 0.4) !important;
    opacity: 1 !important;
    animation: none !important;
    --a: 0deg !important;
}

.message.error + form .submit-btn.find-event-btn:hover .btn-content,
.code-form .message.error ~ form .submit-btn.find-event-btn:hover .btn-content,
.code-form .message.error ~ form .find-event-btn:hover .btn-content {
    background: #5e17eb !important;
    background-image: none !important;
}

/* FIND EVENT Button No Code State - Same styling as error state */
.code-form .submit-btn.find-event-btn:not(.has-code),
.code-form .find-event-btn:not(.has-code),
.submit-btn.find-event-btn:not(.has-code) {
    background: #6c4bd1 !important;
    background-image: none !important;
    animation: none !important;
    border: 2px solid #6c4bd1 !important;
    cursor: pointer !important;
    padding: 18px !important;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(108, 75, 209, 0.3) !important;
    opacity: 1 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    --a: 0deg !important;
}

.code-form .submit-btn.find-event-btn:not(.has-code)::after,
.code-form .find-event-btn:not(.has-code)::after,
.submit-btn.find-event-btn:not(.has-code)::after {
    display: none !important;
    background: none !important;
    animation: none !important;
}

.code-form .submit-btn.find-event-btn:not(.has-code) .btn-content,
.code-form .find-event-btn:not(.has-code) .btn-content,
.submit-btn.find-event-btn:not(.has-code) .btn-content {
    background: #6c4bd1 !important;
    background-image: none !important;
}

.code-form .submit-btn.find-event-btn:not(.has-code):hover,
.code-form .find-event-btn:not(.has-code):hover,
.submit-btn.find-event-btn:not(.has-code):hover {
    background: #5e17eb !important;
    background-image: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(94, 23, 235, 0.4) !important;
    opacity: 1 !important;
    animation: none !important;
    --a: 0deg !important;
}

.code-form .submit-btn.find-event-btn:not(.has-code):hover .btn-content,
.code-form .find-event-btn:not(.has-code):hover .btn-content,
.submit-btn.find-event-btn:not(.has-code):hover .btn-content {
    background: #5e17eb !important;
    background-image: none !important;
}

/* ========================================
   TIPPING BUTTON STYLES
   ======================================== */

/* Tip Section */
.tip-section {
    margin-top: 20px;
    text-align: center;
}

/* Tip Button */
.tip-btn {
    width: 100%;
    background: linear-gradient(145deg, #ff6b35, #fa2d48);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(250, 45, 72, 0.4);
}

@keyframes tipPulse {
    0% {
        box-shadow: 0 0 8px rgba(250, 45, 72, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(250, 45, 72, 0.6), 0 0 25px rgba(255, 107, 53, 0.4);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 8px rgba(250, 45, 72, 0.4);
        transform: scale(1);
    }
}

.tip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(250, 45, 72, 0.5);
    animation: none;
}

.tip-btn:active {
    transform: translateY(0);
}

.tip-btn i {
    font-size: 18px;
    color: #ffb3ba;
}

/* ========================================
   LOOKUP BUTTON STYLES
   ======================================== */

/* Clear Button Styling - positioned inside input field */
.clear-input {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    background: rgba(94, 23, 235, 0.7);
    color: white;
    cursor: pointer;
    display: none;
    z-index: 10;
    padding: 0 15px;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.clear-input:hover {
    background: rgba(255, 77, 77, 0.8);
    color: white;
    transform: scale(1.02);
}

.clear-input i {
    font-size: 1.4rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.8;
}

/* Hide clear button by default */
.clear-input[style*="display: none"] {
    display: none !important;
}

/* Show clear button when needed */
.clear-input[style*="display: block"] {
    display: flex !important;
}

/* Lookup Results Container - Enhanced for Autocomplete */
.lookup-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 80, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 2px;
    width: 100%;
    min-height: 60px;
    display: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideDown 0.2s ease-out;
    /* Fix mobile scrolling */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

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

/* Force visibility when shown */
.lookup-results[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lookup-results.show {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

.lookup-results.hide {
    opacity: 0 !important;
}

/* Result Items */
.result-item {
    padding: 12px 45px 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
    word-wrap: break-word;
    contain: layout style paint;
    position: relative;
}

.result-item:hover {
    background-color: rgba(100, 75, 209, 0.5);
    transform: translateX(2px);
}

.result-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.result-item:last-child:hover {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.result-item:active {
    background-color: rgba(100, 75, 209, 0.7);
}

.result-item i {
    color: #a0d0ff;
    width: 16px;
    flex-shrink: 0;
}

.result-item .result-text {
    flex: 1;
    line-height: 1.4;
    max-width: calc(100% - 35px); /* Ensure text doesn't overlap with match indicator */
    overflow: hidden;
}

.result-item .result-title {
    font-weight: 500;
    font-size: 1.1em;
    margin-bottom: 2px;
}

.result-item .result-meta {
    font-size: 0.85em;
    color: #c0e0ff;
    opacity: 0.9;
}

/* Inline meta information (year/album on same line) */
.result-item .result-meta-inline {
    font-size: 0.85em;
    color: #c0e0ff;
    opacity: 0.8;
    font-weight: 300;
}

/* Artist name styling in song results */
.result-item .artist-name {
    font-weight: 300;
    opacity: 0.9;
    color: var(--neon-blue);
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.2);
}

/* Match Quality Indicators */
.match-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
    padding: 0;
    border-radius: 4px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Font Awesome 6 Free', sans-serif;
}

.match-indicator.exact {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}


.match-indicator.contains {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.match-indicator.fuzzy {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Popular Indicator */
.popular-indicator {
    display: inline-block;
    font-size: 0.7em;
    padding: 2px 6px;
    margin-left: 8px;
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Artist Result Row - Stable Background to Highlight Top 10 Feature */
.result-item.artist-result {
    background: linear-gradient(135deg, rgb(75 142 209 / 60%), rgb(23 42 235 / 35%)) !important;
    position: relative;
    transition: none !important;
}

.result-item.artist-result:hover {
    background: linear-gradient(135deg, rgb(95 162 229 / 75%), rgb(43 62 255 / 50%)) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Top Songs Text Styling */
.top-songs-text {
    background: #e69d22eb !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.75em !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    text-shadow: none !important;
    display: inline-block !important;
    margin-left: 8px !important;
}

/* No Results Message */
.no-results {
    padding: 20px;
    text-align: center;
    color: #a0d0ff;
    font-style: italic;
    opacity: 0.7;
}

/* Keep Typing Message */
.keep-typing-message {
    padding: 20px;
    text-align: center;
    color: #a0d0ff;
    opacity: 0.8;
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.typing-indicator i {
    color: var(--icon-bg);
    font-size: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Ensure submit button animation is isolated */
.submit-btn,
.submit-btn::before,
.submit-btn::after {
    animation-name: a !important;
    animation-duration: 6s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Live Loading Indicator */
.live-loading-indicator {
    padding: 8px 18px;
    background: rgba(94, 23, 235, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0d0ff;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.mini-spinner {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loading State */
.lookup-loading {
    padding: 20px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lookup-loading .spinner-circle {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure parent containers allow overflow */
.app-container,
.main-content,
.request-form,
.song-artist-row,
.form-group,
.input-group {
    overflow: visible !important;
}

/* Additional overflow fixes for dropdown visibility */
.embed-request-form,
.artist-input,
.song-input,
.input-with-lookup {
    overflow: visible !important;
    position: relative !important;
}

/* Scrollbar Styling */
.lookup-results::-webkit-scrollbar {
    width: 8px;
}

.lookup-results::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 8px 8px 0;
}

.lookup-results::-webkit-scrollbar-thumb {
    background: #5e17eb;
    border-radius: 0 8px 8px 0;
}

.lookup-results::-webkit-scrollbar-thumb:hover {
    background: #4a12c4;
}

.lookup-results::-webkit-scrollbar-corner {
    background: transparent;
}

/* Enhanced dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .lookup-results {
        background: rgba(30, 30, 70, 0.98) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
    }
    
    .result-item {
        border-bottom-color: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .result-item:hover {
        background-color: rgba(100, 75, 209, 0.7) !important;
    }
    
    .result-item:last-child:hover {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    
    .form-control {
        background-color: rgba(30, 30, 50, 0.6) !important;
        color: white !important;
    }
    
    .form-control:focus {
        background-color: rgba(30, 30, 50, 0.8) !important;
        box-shadow: none !important;
    }
    
    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.8) !important;
    }
    
    .form-label {
        color: white !important;
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.7) !important;
    }
    
    .app-container {
        background: rgba(26, 26, 46, 0.7) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}


/* Responsive Styles */
@media (max-width: 768px) {
    .app-container {
        max-width: 100%;
    }

    .event-title {
        font-size: 24px;
    }

    .main-content {
        padding: 15px 20px;
    }
    
    /* Additional mobile spacing for search input specifically */
    .main-content .form-group.search-input {
        margin-top: 30px;
        margin-bottom: 25px; /* Reduced spacing between fields */
    }

    /* Match search input spacing for name input on mobile */
    .main-content .form-group.name-input {
        margin-top: 15px; /* Reduced from 18px to better match header-to-search spacing */
    }

    .song-artist-row {
        flex-direction: column;
        gap: 0px;
    }

    .form-group.name-input {
        margin-top: 18px; /* Match the search input spacing */
        margin-bottom: 40px; /* Match the spacing between search and name fields */
    }
    
    /* Make label spacing consistent between search and name inputs */
    .form-group.name-input .form-label,
    .form-group.search-input .form-label {
        margin-bottom: 6px; /* Consistent spacing for both labels */
    }
    
    .lookup-results {
        max-height: 250px;
    }
    
    .result-item {
        padding: 15px 35px 15px 15px; /* More space for text on mobile */
        min-height: 50px;
        gap: 12px;
        align-items: flex-start; /* Ensure top alignment on mobile */
    }
    
    .result-item i {
        width: 18px;
        flex-shrink: 0; /* Prevent icon from shrinking */
    }
    
    .result-text {
        font-size: 16px;
        flex: 1; /* Allow text to take available space */
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        max-width: calc(100% - 30px); /* Ensure text doesn't overlap with match indicator on mobile */
        overflow: hidden;
    }
    
    .result-meta {
        font-size: 0.8em;
        line-height: 1.2;
    }
    
    /* Match indicator positioning for mobile */
    .match-indicator {
        position: absolute;
        right: 5px; /* Closer to edge on mobile */
        top: 15px; /* Fixed position from top instead of center */
        transform: none; /* Remove center transform */
        font-size: 0.65em;
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .song-artist-row {
        flex-direction: row;
    }

    .input-group {
        height: 60px;
    }
}

/* ========================================
   TIP FORM FIELD OVERRIDES - MUST BE HERE DUE TO CSS LOADING ORDER
   ======================================== */

/* Fix tip form labels to match other form labels */
.tip-modal-body label,
.tipper-name-section label,
.tip-amounts h4,
.payment-methods h4,
.custom-amount-container label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Fix tip form sections spacing to match other fields */
.tipper-name-section {
    margin-bottom: 25px !important;
}

.tip-amounts {
    margin-bottom: 25px !important;
}

/* Remove the line/border from custom amount container */
.custom-amount-container {
    border-top: none !important;
}

/* Hide any dollar sign that appears */
.custom-amount-container::before,
.custom-amount-container *::before {
    display: none !important;
    content: none !important;
}


.tip-amount-dropdown {
    margin-bottom: 15px !important;
}

/* Override browser defaults for tip form fields */
#tipperName,
#tipAmountSelect {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #404040 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: 'Poppins', sans-serif !important;
    background: #2a2a2a !important;
    color: #ffffff !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    outline: none !important;
    display: block !important;
    line-height: normal !important;
    text-align: start !important;
    cursor: text !important;
}

#tipAmountSelect {
    cursor: pointer !important;
}

#tipperName:focus,
#tipAmountSelect:focus {
    outline: none !important;
    border-color: #4361ee !important;
    background: #333333 !important;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15) !important;
}

#tipperName::placeholder {
    color: #888888 !important;
}

#tipAmountSelect option {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .event-title {
        font-size: 20px;
    }

    .event-date {
        font-size: 14px;
    }
}