/**
 * Top 100 Voting Plugin - Frontend Styles
 * Mobile-First Responsive Design
 */

/* Reset and Base Styles */
.top100-chart-wrapper *,
.top100-request-form-wrapper * {
    box-sizing: border-box;
}

/* ========================================
   YOUTUBE MODAL STYLES
   ======================================== */

/* Close Button Base Styles */
.youtube-modal-close {
    cursor: pointer;
    user-select: none;
}

.youtube-modal-close svg {
    pointer-events: none;
}

/* Modal Backdrop */
#youtube-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

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

#youtube-modal.hidden {
    animation: fadeOut 0.2s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal Content Animation */
#youtube-modal [role="dialog"] {
    animation: modalSlideIn 0.4s ease-out;
    transform-origin: center center;
}

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

/* Mobile-specific modal adjustments */
@media (max-width: 768px) {
    #youtube-modal {
        padding: 8px !important;
    }
    
    #youtube-modal [role="dialog"] {
        margin: 0 !important;
        border-radius: 8px !important;
        max-height: 90vh;
        max-width: 100vw;
    }
    
    /* Adjust close button for mobile */
    .youtube-modal-close {
        top: -12px !important;
        right: -12px !important;
        width: 44px;
        height: 44px;
        padding: 8px !important;
    }
    
    .youtube-modal-close svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #youtube-modal {
        padding: 4px !important;
    }
    
    #youtube-modal [role="dialog"] {
        border-radius: 6px !important;
        max-height: 95vh;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    #youtube-modal [role="dialog"] {
        max-height: 95vh;
        max-width: 90vw;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .youtube-modal-close {
        border-width: 0.5px;
    }
}

/* Dark mode support for modal */
@media (prefers-color-scheme: dark) {
    .youtube-modal-close {
        background: #374151 !important;
        color: #f3f4f6 !important;
    }
    
    .youtube-modal-close:hover {
        background: #4b5563 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #youtube-modal,
    #youtube-modal [role="dialog"],
    .youtube-modal-close {
        animation: none !important;
        transition: none !important;
    }
}

/* Enhanced YouTube Play Button Styles */
.youtube-play,
.youtube-play-mobile,
.youtube-play-btn,
.youtube-play-button {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.youtube-play:active,
.youtube-play-mobile:active,
.youtube-play-btn:active,
.youtube-play-button:active {
    transform: scale(0.95);
}

/* Movement Indicators - Global */
.movement-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    text-align: center;
    min-width: 50px;
    justify-content: center;
}

.movement-up {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
}

.movement-up .arrow {
    color: #22c55e;
}

.movement-down {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.movement-down .arrow {
    color: #ef4444;
}

.movement-new {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.movement-same {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

/* Arrow Icons */
.movement-arrow {
    font-size: 14px;
    font-weight: bold;
}

/* Utility Classes */
.top100-hidden {
    display: none !important;
}

.top100-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Images */
.top100-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* Accessibility */
.top100-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.vote-btn:focus,
.submit-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .vote-btn,
    .submit-btn,
    .form-submit-section {
        display: none !important;
    }
    
    .top100-chart-wrapper,
    .top100-request-form-wrapper {
        box-shadow: none !important;
        background: white !important;
    }
    
    .track-card,
    .top100-table {
        break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .vote-btn {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .submit-btn {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .movement-indicator {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .top100-chart-wrapper,
    .top100-request-form-wrapper {
        color: #f3f4f6;
    }
    
    .track-card,
  .top100-request-form {
        background: #f3f3f3 !important;
        border-color: #363636 !important;
    }
    
    .form-input,
    .form-textarea {
        background: #b2b0b0 !important;
        border-color: #4b5563 !important;
        color: #050505 !important;
    }
    
    .form-input:focus,
    .form-textarea:focus {
        border-color: #667eea !important;
        background: #cbcbcb !important;
    }
    
    .top100-table {
        background: #1f2937 !important;
    }
    
    .top100-table th {
        background: #374151 !important;
        color: #f3f4f6 !important;
    }
    
    .top100-table td {
        border-color: #4b5563 !important;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Entry Animations */
.track-card {
    animation: fadeIn 0.3s ease-out;
}

.track-card:nth-child(1) { animation-delay: 0.1s; }
.track-card:nth-child(2) { animation-delay: 0.2s; }
.track-card:nth-child(3) { animation-delay: 0.3s; }
.track-card:nth-child(4) { animation-delay: 0.4s; }
.track-card:nth-child(5) { animation-delay: 0.5s; }

/* Loading States */
.track-card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.vote-btn.loading {
    position: relative;
}

.vote-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error States */
.form-input.error,
.form-textarea.error {
    border-color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.05) !important;
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: "⚠";
    font-size: 16px;
}

/* Success States */
.form-input.success,
.form-textarea.success {
    border-color: #16a34a !important;
    background: rgba(22, 163, 74, 0.05) !important;
}

.success-message {
    color: #16a34a;
    font-size: 14px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.success-message::before {
    content: "✓";
    font-size: 16px;
}

/* Custom Scrollbar */
.top100-chart-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.top100-chart-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.top100-chart-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.top100-chart-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Notification Styles */
.top100-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #16a34a;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.top100-notification.error {
    border-left-color: #dc2626;
}

.top100-notification.warning {
    border-left-color: #f59e0b;
}

/* Mobile Specific Optimizations */
@media (max-width: 767px) {
    .top100-chart-wrapper,
    .top100-request-form-wrapper {
        padding: 10px;
    }
    
    .track-card {
        margin-bottom: 8px;
        padding: 12px;
    }
    
    .form-header,
    .top100-request-form {
        padding: 20px;
    }
    
    .submit-btn {
        width: 100%;
        max-width: none;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .top100-chart-wrapper {
        padding: 20px;
    }
    
    .track-card {
        padding: 18px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .top100-chart-wrapper {
        padding: 40px;
    }
    
    .desktop-chart .top100-table {
        font-size: 16px;
    }
    
    .desktop-chart .position {
        font-size: 20px;
    }
}

/* RTL Support */
[dir="rtl"] .top100-chart-wrapper,
[dir="rtl"] .top100-request-form-wrapper {
    direction: rtl;
}

[dir="rtl"] .track-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-row {
    flex-direction: row-reverse;
}

/* ========================================
   MULTI-GENRE SYSTEM STYLES
   ======================================== */

/* Genre Badges */
.genre-badge,
.genre-badge-mobile {
    display: inline-flex;
    align-items: center;
    background: #007cba;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.genre-badge-mobile {
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 10px;
}

/* Enhanced color override for inline styles */
.genre-badge[style*="background-color"],
.genre-badge-mobile[style*="background-color"] {
    background: inherit !important;
}

/* Movement Indicators - Red Triangular Arrows */
.movement-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12px;
}

.movement-indicator div {
    display: inline-block;
    line-height: 0;
}

/* Full Title Display - No Truncation */
.top100-track-title {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Mobile responsive title adjustments */
@media (max-width: 640px) {
    .top100-track-title {
        font-size: 0.875rem !important;
        max-width: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .top100-track-title {
        font-size: 1rem !important;
        max-width: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

/* Ensure proper alignment with new layout */
.top100-track-artist {
    font-size: 0.875rem;
    color: #6b7280;
}

/* YouTube Play Buttons */
.youtube-play,
.youtube-play-mobile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff0000;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.youtube-play-mobile {
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 10px;
    gap: 4px;
}

.youtube-play:hover,
.youtube-play-mobile:hover {
    background: #cc0000;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 0, 0, 0.3);
}

.youtube-play svg,
.youtube-play-mobile svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.youtube-play-mobile svg {
    width: 12px;
    height: 12px;
}

/* Track Meta Container */
.track-meta,
.track-meta-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.track-meta-mobile {
    gap: 6px;
    margin-top: 4px;
}

/* Multi-genre chart specific styles */
.top100-multi-genre-chart {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 20px auto;
    max-width: 900px;
}

.chart-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.genre-info {
    margin: 15px 0;
}

.genre-description {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.4;
}

/* Chart refresh button */
.refresh-chart-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.refresh-chart-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* ========================================
   THUMBNAIL STYLES
   ======================================== */

/* Thumbnail Container */
.track-thumbnail {
    flex-shrink: 0;
    margin-right: 12px;
}

[dir="rtl"] .track-thumbnail {
    margin-right: 0;
    margin-left: 12px;
}

/* Thumbnail Images */
.thumbnail-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.thumbnail-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Mobile Chart Thumbnails */
.mobile-chart .track-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-chart .track-position {
    order: 1;
}

.mobile-chart .track-thumbnail {
    order: 2;
    margin-right: 0;
}

.mobile-chart .track-info {
    order: 3;
    flex: 1;
}

.mobile-chart .track-movement {
    order: 4;
}

.mobile-chart .track-votes {
    order: 5;
}

/* Desktop Table Thumbnails */
.desktop-chart .thumbnail {
    width: 80px;
    text-align: center;
    padding: 8px;
}

.desktop-chart .thumbnail .thumbnail-image {
    width: 64px;
    height: 64px;
    border-radius: 6px;
}

/* Responsive Thumbnail Sizes */
@media (max-width: 480px) {
    .thumbnail-image {
        width: 48px;
        height: 48px;
    }
    
    .mobile-chart .track-card {
        gap: 8px;
    }
    
    .track-thumbnail {
        margin-right: 8px;
    }
    
    [dir="rtl"] .track-thumbnail {
        margin-right: 0;
        margin-left: 8px;
    }
}

@media (min-width: 768px) {
    .thumbnail-image {
        width: 64px;
        height: 64px;
    }
}

@media (min-width: 1024px) {
    .desktop-chart .thumbnail .thumbnail-image {
        width: 72px;
        height: 72px;
    }
}

/* Loading and Error States */
.thumbnail-image.loading {
    opacity: 0.6;
    animation: pulse 2s infinite;
}

.thumbnail-image.error {
    opacity: 0.5;
    filter: grayscale(100%);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

/* Accessibility */
.thumbnail-image:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .thumbnail-image {
        border: 2px solid currentColor;
    }
    
    .genre-badge,
    .genre-badge-mobile {
        border: 2px solid currentColor;
    }
    
    .youtube-play,
    .youtube-play-mobile {
        border: 2px solid currentColor;
    }
}

/* ========================================
   MULTI-GENRE RESPONSIVE STYLES
   ======================================== */

/* Mobile optimizations for multi-genre */
@media (max-width: 480px) {
    .track-meta-mobile {
        gap: 4px;
        margin-top: 3px;
    }
    
    .genre-badge-mobile {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 8px;
    }
    
    .youtube-play-mobile {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 8px;
    }
    
    .youtube-play-mobile svg {
        width: 10px;
        height: 10px;
    }
    
    .top100-multi-genre-chart {
        margin: 10px;
        border-radius: 8px;
    }
    
    .chart-header {
        padding: 20px 15px;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .genre-badge,
    .genre-badge-mobile {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .youtube-play,
    .youtube-play-mobile {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .youtube-play svg,
    .youtube-play-mobile svg {
        width: 16px;
        height: 16px;
    }
}

/* Large screen optimizations */
@media (min-width: 1024px) {
    .genre-badge {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 14px;
    }
    
    .youtube-play {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 14px;
    }
    
    .youtube-play svg {
        width: 18px;
        height: 18px;
    }
}

/* Dark mode support for multi-genre */
@media (prefers-color-scheme: dark) {
    .top100-multi-genre-chart {
        background: #1f2937;
        color: #f3f4f6;
    }
    
    .chart-header {
        background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    }
    
    .genre-badge,
    .genre-badge-mobile {
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
}

/* Animation for genre badges and YouTube buttons */
@keyframes genreBadgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.genre-badge:hover,
.genre-badge-mobile:hover {
    animation: genreBadgeFloat 0.6s ease-in-out;
    transform: scale(1.05);
}

/* Loading states for multi-genre elements */
.genre-badge.loading,
.youtube-play.loading {
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
}
/* Mobile-specific fixes for performance - moved from inline */
@media (max-width: 640px) {
    /* Ensure vote buttons don't get cut off */
    .top100-track-card {
        padding-right: 0.75rem !important;
    }
    
    .top100-vote-button {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 4rem !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Better text wrapping */
    .top100-track-title {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Genre badge alignment */
    .genre-badge-mobile {
        margin-left: 0 !important;
    }
}

/* Vote icon responsive styles */
@media (min-width: 640px) {
    .vote-icon-desktop {
        display: inline-block !important;
    }
}

/* Mobile vote icon (existing) */
.vote-icon-mobile {
    display: inline-block;
}

@media (min-width: 640px) {
    .vote-icon-mobile {
        display: none;
    }
}

/* Vote button responsive styling */
.top100-vote-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 640px) {
    .top100-vote-button {
        padding: 12px 20px;
    }
}

/* Vote Button Centering and Mobile Optimizations */
.vote-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vote-icon-mobile,
.vote-icon-desktop {
    display: inline-block;
    flex-shrink: 0;
}

/* Mobile Vote Button - Less Border Radius */
@media (max-width: 640px) {
    .top100-vote-button {
        border-radius: 8px !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .top100-vote-button svg {
        margin: 0 !important;
    }
}

/* Desktop Vote Button - Full Border Radius */
@media (min-width: 640px) {
    .top100-vote-button {
        border-radius: 9999px !important; /* rounded-full equivalent */
    }
}

/* Enhanced Genre Badge Positioning */
.genre-badge-overlay {
    position: absolute;
    bottom: 1.5rem; /* -bottom-6 equivalent */
    left: 0.5rem;   /* left-2 equivalent */
    z-index: 10;
}

/* Ensure thumb icons are perfectly centered */
.top100-vote-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .top100-vote-button {
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Enhanced Movement Indicators - Red Triangular Arrows */
.movement-indicator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 16px !important;
    width: 100% !important;
}

.movement-indicator > div {
    display: block !important;
    line-height: 0 !important;
}

/* Ensure red triangles are visible */
.movement-indicator div[class*="border-l-2"][class*="border-b-4"] {
    border-color: transparent transparent #dc2626 transparent !important;
}

.movement-indicator div[class*="border-l-2"][class*="border-t-4"] {
    border-color: #dc2626 transparent transparent transparent !important;
}

/* Better alignment for movement indicators */
.movement-indicator .w-0 {
    width: 0 !important;
    height: 0 !important;
    margin: 0 auto !important;
}

/* Genre badge perfect centering */
.absolute.-bottom-6.left-1\/2 {
    transform: translateX(-50%) !important;
    z-index: 10;
}

/* Vote icon containers - Perfect centering */
.vote-icon-container,
.vote-icon-container-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.vote-icon-container svg,
.vote-icon-container-desktop svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Ensure movement indicators show above rank numbers */
.top100-rank-number {
    position: relative;
    z-index: 5;
}

/* Make sure movement indicators are visible */
.movement-indicator {
    position: relative;
    z-index: 10;
    margin-bottom: 0.25rem;
}

/* Debug - temporarily make movement indicators more visible */
.movement-indicator div {
    background: #dc2626 !important;
}

/* CRITICAL FIXES: Ensure spacing and alignment work properly */

/* Page container spacing - applied from settings */
.top100-mobile-wrapper,
.top100-chart-wrapper,
.top100-request-form-wrapper {
    /* These will be overridden by dynamic CSS from settings */
    transition: all 0.3s ease;
}

/* Track info alignment - FIXED: Ensure left alignment */
.top100-track-card {
    text-align: left !important;
}

.top100-track-title,
.top100-track-artist,
.top100-track-year {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* ========================================
   DARK VOTE SUCCESS MODAL STYLES
   ======================================== */

/* Backdrop */
.vote-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vote-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.vote-success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #2D3748;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    max-width: 400px;
    width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.vote-success-modal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Content */
.vote-success-modal .modal-content {
    padding: 32px 24px;
    text-align: center;
}

/* Modal Header */
.vote-success-modal .modal-header {
    margin-bottom: 20px;
}

.vote-success-modal .success-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.vote-success-modal .modal-title {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Modal Body */
.vote-success-modal .modal-body {
    margin-bottom: 24px;
}

.vote-success-modal .modal-message {
    color: #A0AEC0;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Modal Footer */
.vote-success-modal .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Share Button */
.vote-success-modal .share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #7C3AED;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.vote-success-modal .share-button:hover {
    background: #6D28D9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.vote-success-modal .share-button:active {
    transform: translateY(0);
}

.vote-success-modal .share-button svg {
    flex-shrink: 0;
}

/* Close Button */
.vote-success-modal .close-button {
    padding: 10px 20px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vote-success-modal .close-button:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.vote-success-modal .close-button:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .vote-success-modal {
        width: 95vw;
        max-width: none;
    }
    
    .vote-success-modal .modal-content {
        padding: 24px 20px;
    }
    
    .vote-success-modal .modal-title {
        font-size: 20px;
    }
    
    .vote-success-modal .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .vote-success-modal .share-button,
    .vote-success-modal .close-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .vote-success-modal .modal-content {
        padding: 20px 16px;
    }
    
    .vote-success-modal .modal-title {
        font-size: 18px;
    }
    
    .vote-success-modal .success-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   NOTIFICATION ANIMATIONS
   ======================================== */

@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

.top100-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: slideInRight 0.3s ease-out;
}

.top100-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ensure proper alignment in flex containers */
.top100-track-card .flex-grow {
    text-align: left !important;
}

/* Color application from settings - backup styles */
.top100-chart-header {
    /* These will be overridden by dynamic CSS from settings */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top100-track-card {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top100-rank-number {
    transition: color 0.3s ease;
}

.top100-vote-button {
    transition: background-color 0.3s ease;
}

.top100-vote-count {
    transition: color 0.3s ease;
}

/* Mobile responsive alignment fixes */
@media (max-width: 640px) {
    .top100-track-card {
        text-align: left !important;
    }
    
    .top100-track-title,
    .top100-track-artist,
    .top100-track-year {
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}