@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #000000;
    --secondary-color: #FF8530;
    --background-color: #F0EFE6;
    --text-color: #000000;
    --scanner-color: #FFCD00;
    --result-background: #ffffff;
    --result-text-color: #000000;
    --result-color: #000000;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-family: 'Montserrat';
    font-size: 2.5rem;
    color: var(--text-color);
    letter-spacing: 2px;
    font-weight: 700;
    transition: color 0.5s ease;
}

h1 .nova {
    color: #000000;
    margin-right: 0.1em;
}

h1 .scanner {
    color: #FFCD00;
}

header p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 40px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    transition: all 0.3s ease;
    outline: 2px solid var(--result-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scanner-container.shrink {
    max-width: 133px;
    margin-bottom: 20px;
}

.scanner-container.highlight {
    box-shadow: 0 0 30px var(--result-color);
    transform: scale(1.02);
}

.scanner-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
    cursor: pointer;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1), transparent);
    pointer-events: none;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.scanner-container.highlight .scanner-overlay {
    background-color: rgba(0, 255, 255, 0.2);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--scanner-color);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 15;
    animation: oscillate 4s ease-in-out infinite;
}

@keyframes oscillate {
    0%, 100% {
        top: 0;
    }
    50% {
        top: calc(100% - 4px);
    }
}

#preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
}

.placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; /* 50% of original 500px */
    height: 200px; /* 50% of original 500px */
    opacity: 0.8;
    z-index: 10;
}

.placeholder-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-form {
    text-align: center;
    margin-bottom: 40px;
}

.custom-file-upload {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--result-color, #ffffff); /* Fallback to black if var isn't set */
    color: white; /* Default white text */
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease, color 0.3s ease; /* Added color transition */
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Change text color when --result-color is set */
:root[style*="--result-color"] .custom-file-upload {
    color: black;
}

.custom-file-upload:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.custom-file-upload:active {
    transform: translateY(0);
}

.custom-file-upload i {
    margin-right: 8px;
}

#file-upload {
    display: none;
}

.result {
    background-color: var(--result-background);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    color: var(--result-text-color);
}

.result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--result-color, transparent);
    opacity: 0.1;
    transition: all 0.5s ease;
    z-index: 0;
}

#food-item-title {
    width: 100%;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
    cursor: pointer;
    text-align: center;
    outline: none; /* Remove the orange outline */
    border: none; /* Ensure no border either */
}

.title-text {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 4px 35px;
    border-radius: 4px;
    text-align: center;
    min-width: 50px;
    position: relative;
    display: inline-block;
    max-width: 100%; /* Limit width to container */
    word-wrap: break-word; /* Enable word wrapping */
    white-space: pre-wrap; /* Preserve spaces and enable wrapping */
    overflow-wrap: break-word; /* Handle long words */
}

.icon-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    padding: 4px;
    pointer-events: none;
}

.edit-icon {
    font-size: 1.2rem;
    color: #666;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Hover effects */
.title-text:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.title-text:focus {
    background-color: rgba(0, 0, 0, 0.08);
    outline: none;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .title-text {
        font-size: 1.5rem;
        padding: 4px 32px;
    }
    
    .edit-icon {
        font-size: 1rem;
    }
}

.rescan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -15px auto 25px;
    padding: 10px 20px;
    background-color: var(--result-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
}

.rescan-button:not(.hidden) {
    display: flex !important;
}

.rescan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.rescan-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rescan-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.rescan-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.nova-image-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    border-radius: 10px;
    width: 80%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.nova-background {
    position: absolute;
    top: 1%;
    left: 1%;
    width: 98%;
    height: 98%;
    border-radius: 11px;
    z-index: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.1);
}

.nova-image {
    display: inline-block;
    border-radius: 10px;
    background-color: transparent;
    position: relative;
}

.nova-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0));
    border-radius: 10px;
}

.nova-text, #nova-group-text {
    font-size: 1.1rem;
    color: black;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.nova-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 35px 0;
}

.badge-inner {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.3rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--result-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2),
                inset 0 -5px 15px rgba(0, 0, 0, 0.2),
                inset 0 5px 15px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.badge-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    transform: rotate(30deg);
    animation: badgeShine 4s infinite linear;
}

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

#nova-score-value {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.badge-label {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: black;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.processing-scale {
    margin: 30px 0;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    position: relative;
    z-index: 1;
}

.scale-labels, .scale-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.scale-label, .scale-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--result-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scale-label.left {
    text-align: left;
}

.scale-label.right {
    text-align: right;
}

.scale-container {
    position: relative;
    height: 50px;
    margin-top: 25px;
    margin-bottom: 0;
}

.scale-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to right, #ff0000, #ffff00, #00ff00);
    transform: translateY(-50%);
    border-radius: 5px;
    overflow: hidden;
}

.scale-marker {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background-color: white;
    border: 3px solid #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: left 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scale-marker::after {
    content: attr(data-score);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: bold;
    color: var(--result-text-color);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#reasoning {
    color: var(--result-text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-weight: 400;
    text-align: center;
    margin-top: 25px;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-top: 40px;
}

@media (max-width: 600px) {
    .result {
        padding: 20px;
    }

    #food-item-title {
        font-size: 1.8rem;
    }

    .nova-text, #nova-group-text {
        font-size: 1.1rem;
    }

    .badge-inner {
        width: 130px;
        height: 130px;
        font-size: 2rem;
    }

    #reasoning {
        font-size: 1rem;
    }
}

.pro-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .pro-mode-label {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
  }
  
  .switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
  }
  
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: var(--scanner-color);
  }
  
  input:checked + .slider:before {
    transform: translateX(26px);
  }
  
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

  .auth-container {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 100;
    display: none;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: background-color 0.3s;
}

@media (max-width: 768px) {
    .auth-container {
        top: 15px;
        left: 15px;
    }
}

.menu-button {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #000;
    z-index: 100;
    padding: 8px;
}

.menu-button:hover {
    color: #FFCD00;
}

@media (max-width: 768px) {
    .menu-button {
        top: 15px;
        right: 15px;
    }
}

.sidebar-header {
    text-align: center;
    padding: 20px;
    position: relative;
}

.sidebar-back-btn {
    position: absolute;
    left: 15px;
    top: 20px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
}

.sidebar-profile-picture {
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto 15px;
}

.sidebar-profile-picture i {
    font-size: 60px;
    color: #999;
}

.sidebar-profile-name {
    margin-top: 10px;
    font-weight: 600;
}

.auth-button:hover {
    background-color: #f5f5f5;
}

.auth-button img {
    width: 18px;
    height: 18px;
}

.scan-limit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scan-limit-popup.show {
    opacity: 1;
    visibility: visible;
}

.scan-limit-content {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.scan-limit-popup.show .scan-limit-content {
    transform: translateY(0);
}

.scan-limit-icon {
    font-size: 3rem;
    color: var(--scanner-color);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scan-limit-content h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.scan-limit-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.upgrade-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.upgrade-button .fas {
    font-size: 1.2rem;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-popup:hover {
    color: #333;
}

@media (max-width: 480px) {
    .scan-limit-content {
        padding: 30px 20px;
    }

    .scan-limit-content h2 {
        font-size: 1.5rem;
    }

    .scan-limit-content p {
        font-size: 1rem;
    }

    .upgrade-button {
        padding: 10px 24px;
        font-size: 1rem;
    }
}

#subscription-status {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 100;
}

.subscription-button {
    background-color: #FFCD00;
    color: black;
    border: none;
    border-radius: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subscription-button i {
    font-size: 0.875rem;
}

.subscription-button.plus {
    background-color: #FFCD00;
}

.subscription-button.pro {
    background-color: #FFCD00;
}

.subscription-button:hover {
    background-color: #FFCD00;
    opacity: 0.9;
    transform: translateY(-2px);
}

.manage-subscription-button {
    background-color: var(--scanner-color); /* Using your yellow accent color */
    color: black;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.manage-subscription-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.manage-subscription-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* New loading overlay styles */
.loading-overlay {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--background-color);
    border-top: 5px solid var(--scanner-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: var(--scanner-color);
}

@media (max-width: 768px) {
    #subscription-status {
        top: 15px;
        left: 15px;
    }
}

.subscription-tier-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 20px auto;
    font-weight: 500;
    background-color:white;
    max-width: max-content;
    border-radius: 20px;
    padding: 0.5em 1em;
    display: none; /* Hidden by default, JS will set to block when text is inserted */
 }

 .subscription-crown {
    text-align: center;
    margin: 20px auto 5px;
    font-size: 5rem;
    color: var(--scanner-color);
    display: none;
}

.pricing-container {
    background-color: white;
    border-radius: 30px;
    padding: 40px;
    margin: 0 auto;
    max-width: 1100px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .pricing-container {
        padding: 20px 10px;
        border-radius: 20px;
        margin: 0 10px;
    }
}

.info-icon-container {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    position: relative;
}

.info-icon {
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.info-icon.active {
    color: var(--scanner-color);
}

/* Add hover styles for desktop */
@media (hover: hover) {
    .info-icon:hover {
        color: var(--scanner-color);
    }
    
    .info-icon-container:hover .info-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.info-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 8px;
    padding: 12px 16px;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.super-scans-counter {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    font-style: italic;
    display: none; /* Hidden by default */
}

.info-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.info-tooltip-list {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: none;
}

.info-tooltip-list li {
    margin: 8px 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    position: relative;
}

.info-tooltip-list li::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--scanner-color);
    border-radius: 50%;
}

.info-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .info-tooltip {
        max-width: 200px;
    }
}

#superScanLimitPopup .scan-limit-icon {
    color: var(--scanner-color); /* This will use your yellow color variable */
}

#superScanLimitPopup .scan-limit-content h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#superScanLimitPopup .scan-limit-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Add responsive styles if needed */
@media (max-width: 480px) {
    #superScanLimitPopup .scan-limit-content {
        padding: 30px 20px;
    }

    #superScanLimitPopup .scan-limit-content h2 {
        font-size: 1.5rem;
    }

    #superScanLimitPopup .scan-limit-content p {
        font-size: 1rem;
    }
}

.share-button {
    /* Size and layout */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px auto;
    padding: 16px 32px;
    min-width: 160px;

    /* Styling */
    background-color: var(--result-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;

    /* Typography */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    /* Effects */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

@media (max-width: 768px) {
    .share-button {
        padding: 16px 32px;
        min-width: 140px;
        font-size: 1rem;
        gap: 8px;
    }

    .share-button::before {
        width: 16px;
        height: 16px;
    }
}

/* Hide the original Font Awesome icon */
.share-button i.fas.fa-share-alt {
    display: none;
}

/* Add custom share icon */
.share-button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('/nova-images/share_icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.share-button:not(.hidden) {
    display: flex !important;
}

/* Enhanced hover effect */
.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
    padding: 16px 36px; /* Slight expansion on hover */
}

/* Click effect */
.share-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Pulse animation for extra attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.share-button {
    animation: pulse 2s infinite;
}

.share-button:hover {
    animation: none;
}

.header-link {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.header-link:hover {
    opacity: 0.9;
}

.blog-share-button {
    /* Size and layout - same as share-button */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px auto;
    padding: 16px 32px;
    min-width: 160px;

    /* Styling - same background but with white text */
    background-color: var(--result-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;

    /* Typography - same as share-button */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    /* Effects - same as share-button */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

/* Icon styles - same as share-button but with white icon */
.blog-share-button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('/nova-images/share_icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);  /* Makes the icon white */
}

/* Hover effects - same as share-button */
.blog-share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
    padding: 16px 36px;
}

/* Click effect - same as share-button */
.blog-share-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Display handling - same as share-button */
.blog-share-button:not(.hidden) {
    display: flex !important;
}

/* Disabled state - same as share-button */
.blog-share-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Animation - same as share-button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.blog-share-button {
    animation: pulse 2s infinite;
}

.blog-share-button:hover {
    animation: none;
}