:root {
    --dark-bg: #000;
    --darker-bg: #33333344;
    --pink-accent: #ff69b4;
    --orange-accent: #ff8c00;
    --blue-accent: #5cc0ff;
    --purple-accent: #7e7cff;
    --text-color: #ffffff;
    --input-bg: #2d2d2d;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    position: relative;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: normal;
}

h1 {
    font-size: 140%;
}


h2 {
    font-size: 120%;
    margin: 30px 0;
    text-align: center;
}

h3 {
    font-size: 105%;
    color: #fff;
}

.type_fireworks h1,
.type_fireworks h2,
.type_fireworks h3 {
    color: var(--pink-accent);
}

.type_mascleta h1,
.type_mascleta h2,
.type_mascleta h3 {
    color: var(--orange-accent);
}

.type_mascleta.nocturna h1,
.type_mascleta.nocturna h2,
.type_mascleta.nocturna h3 {
    color: var(--blue-accent);
}

.type_other h1,
.type_other h2,
.type_other h3 {
    color: var(--purple-accent);
}

.type_drones h1,
.type_drones h2,
.type_drones h3 {
    color: var(--purple-accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

/* Header and Navigation */
.header {
    background-color: var(--darker-bg);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: slideIn 0.4s ease-out;
}

.header a {
    text-decoration: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

/* Stagger form group animations */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--input-bg);
    border: 1px solid #404040;
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--pink-accent);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.25);
    outline: none;
}

/* Field row layout */
.field-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.field-row select {
    flex: 3;
}

.field-row .btn {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
    padding: 0.75rem 1rem;
}

/* Hidden fields */
.new-field {
    margin-top: 0.5rem;
    display: none;
}

/* Button styles with gradient */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    background: linear-gradient(135deg, var(--pink-accent), var(--orange-accent));
    color: white;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink-accent), var(--orange-accent));
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #ff4757);
}

.btn-black {
    background: #000;
}

/* Back button specific style */
.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    max-width: 200px;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    min-width: auto;
    width: auto;
}

.btn-icon {
    padding: 0.4rem;
    font-size: 1rem;
    min-width: 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #000;
}

.clear {
    clear: both;
}


/* Rating cards */
.rating-card {
    position: relative;
    background-color: var(--darker-bg);
    border-radius: 8px;
    border: 1px solid #444;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--pink-accent);
}

.type_mascleta .rating-card,
.type_mascleta.rating-card {
    border-left: 4px solid var(--orange-accent);
}

.nocturna .rating-card,
.nocturna.rating-card,
.ratings-list .nocturna {
    border-left: 4px solid var(--blue-accent) !important;
}

.type_other .rating-card,
.type_other.rating-card {
    border-left: 4px solid var(--purple-accent);
}

.type_drones .rating-card,
.type_drones.rating-card {
    border-left: 4px solid var(--purple-accent);
}


/* Stagger rating card animations */
.rating-card:nth-child(1) { animation-delay: 0.1s; }
.rating-card:nth-child(2) { animation-delay: 0.2s; }
.rating-card:nth-child(3) { animation-delay: 0.3s; }

.rating-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

h3 {
    margin-bottom: 1rem;
}

.type_mascleta h3 {
    color: var(--orange-accent);
}

.type_mascleta.nocturna h3 {
    color: var(--blue-accent);
}

.type_other h3 {
    color: var(--purple-accent);
}

.type_drones h3 {
    color: var(--purple-accent);
}

.user-link {
    color: var(--pink-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}


.type_mascleta .user-link {
    color: var(--orange-accent);
}

.type_other .user-link {
    color: var(--purple-accent);
}

.type_drones .user-link {
    color: var(--purple-accent);
}

.type_mascleta.nocturna .user-link {
    color: var(--blue-accent);
}

.user-link:hover {
    opacity: 0.8;
}

/* Slider styling */
.rating-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--darker-bg), var(--pink-accent), var(--orange-accent));
    outline: none;
    transition: opacity 0.2s;
}

.rating-slider#pacing {
    background: linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.8));
}

.rating-slider#technical {
    background: linear-gradient(to right, rgba(255, 77, 0, 0.2), rgba(255, 77, 0, 0.8));
}

.rating-slider#colour {
    background: linear-gradient(to right, rgba(255, 0, 174, 0.2), rgba(255, 0, 174, 0.8));
}

.rating-slider#visibility {
    background: linear-gradient(to right, rgba(255, 196, 0, 0.2), rgba(255, 196, 0, 0.8));
}

.rating-slider#impact {
    background: linear-gradient(to right, rgba(126, 124, 255, 0.2), rgba(126, 124, 255, 0.8));
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    border: 2px solid #fff;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,105,180,0.5);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-value {
    min-width: 3rem;
    text-align: center;
    background-color: var(--pink-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: white;
}

/* Rating actions */
.rating-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rating-actions .btn {
    width: auto;
    flex: none;
}

@media (max-width: 768px) {
    .rating-actions {
        flex-direction: row;
    }

    .rating-actions .btn {
        flex: 1;
        width: auto;
    }
}

.video-link {
    margin: 5px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.video-link a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
}

.video-separator {
    color: #666;
    font-weight: normal;
}

textarea {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    touch-action: pan-y;
}

/* Delete confirmation popup */
.confirm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background-color: #000000ee;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Login form specific styles */
.login-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--darker-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease-out;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out;
}

/* Date input styling */
input[type="date"] {
    background-color: var(--input-bg);
    color: var(--text-color);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert-error {
    background-color: #dc3545;
    color: white;
}

.alert-success {
    background-color: #28a745;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .rating-card {
        padding: 1rem;
    }

    .field-row {
        gap: 0.25rem;
    }

    .field-row .btn {
        min-width: 80px;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .btn-back {
        width: auto;
        margin-bottom: 0;
    }

    .rating-actions {
        flex-direction: row;
    }

    .rating-actions .btn {
        width: auto;
        margin-bottom: 0;
    }
}

/* Add to your CSS file */

.rating-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.info-icon {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.info-icon:hover {
    opacity: 1;
}

.rating-info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000000ee;
    border: 1px #333 solid;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.rating-info-popup.visible {
    opacity: 1;
    visibility: visible;
}

.rating-info-popup h3 {
    color: var(--pink-accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.rating-info-popup ul {
    list-style-type: none;
    padding: 0;
}

.rating-info-popup li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    padding-left: 1.2em;
    position: relative;
}

.rating-info-popup li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--pink-accent);
}

.close-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 2.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-info:hover {
    opacity: 1;
}

/* Background container */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    height: 100vh;
}

@keyframes rocketUp {
    0% {
        transform: translateY(110vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-75vh) translateX(var(--x-drift));
        opacity: 0;
    }
}

.rocket {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    filter: blur(3px);
    bottom: 0;
    opacity: 0;
}

/* Different colored rockets with varying speeds */
.rocket:nth-child(3n+1) {
    background: var(--pink-accent);
    --x-drift: 50px;
    animation: rocketUp 8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    animation-delay: 0s;
    left: 15%;
}

.rocket:nth-child(3n+2) {
    background: var(--orange-accent);
    --x-drift: -30px;
    animation: rocketUp 7s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    animation-delay: 1s;
    left: 45%;
}

.rocket:nth-child(3n+3) {
    background: #FFD700;
    --x-drift: 20px;
    animation: rocketUp 9s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    animation-delay: 2s;
    left: 75%;
}

.rocket:nth-child(4n+1) {
    animation-delay: 0.5s;
    left: 25%;
}

.rocket:nth-child(4n+2) {
    animation-delay: 1.5s;
    left: 55%;
}

.rocket:nth-child(4n+3) {
    animation-delay: 2.5s;
    left: 85%;
}

/* Varying sizes */
.rocket:nth-child(2n) {
    width: 4px;
    height: 4px;
    filter: blur(2px);
}

.rocket:nth-child(3n) {
    width: 8px;
    height: 8px;
    filter: blur(4px);
}


.notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.pwa-banner {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background-color: #ffffffee;
    color: #000;
    padding: 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 5px;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

.pwa-install-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pwa-install-btn:hover {
    background-color: #f0f0f0;
}

.pwa-close-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.pwa-close-btn:hover {
    opacity: 1;
}


.rating-bar-container {
    display: flex;
    width: 100%;
    height: 50px;
    overflow: hidden;
    margin: 10px 0;
}

.rating-segment {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-size: 0.9em;
    min-width: 40px; /* Ensures tiny segments still show their number */
    position: relative;
    background: linear-gradient(
            to bottom,
            transparent 0%,
            transparent 50%,
            var(--segment-color) 50%,
            var(--segment-color) 100%
    );
}

/* Segment colors */
.segment-pacing {
    --segment-color: rgba(255, 0, 0, 0.4);
    border-radius: 0 0 0 5px;
}

.segment-technical {
    --segment-color: rgba(255, 77, 0, 0.4);
}

.segment-colour {
    --segment-color: rgba(255, 0, 174, 0.4);
}

.segment-visibility {
    --segment-color: rgba(255, 196, 0, 0.4);
}

.segment-impact {
    --segment-color: rgba(126, 124, 255, 0.4);
    border-radius: 0 5px 5px 0;
}

.segment-label {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 0 8px;
}

.show-card {
    margin-bottom: 2rem;
    background-color: var(--darker-bg);
    border-radius: 8px;
    overflow: hidden;
}

.show-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.swipeable-ratings {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    width: 100%;
}

.ratings-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.3s ease-out;
}

.rating-card {
    flex: 0 0 100%;
    width: 100%;
    padding: 1rem;
}

.rating-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9em;
    opacity: 0.7;
}


@keyframes fadeOut {
    to {
        opacity: 0;
    }
}


/* Navigation arrows */
.swipeable-ratings {
    position: relative;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, opacity 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-arrow:hover {
    background-color: var(--pink-accent);
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

/* Indicator dots */
.indicator-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.indicator-dot.active {
    background-color: var(--pink-accent);
    transform: scale(1.2);
}

.type_mascleta .indicator-dot.active {
    background-color: var(--orange-accent);
}

.type_other .indicator-dot.active {
    background-color: var(--purple-accent);
}

.type_drones .indicator-dot.active {
    background-color: var(--purple-accent);
}

.type_mascleta.nocturna .indicator-dot.active {
    background-color: var(--blue-accent);
}

.indicator-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Make sure the container is properly positioned for the absolute arrows */
.swipeable-ratings {
    padding: 0 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .prev-arrow {
        left: 5px;
    }

    .next-arrow {
        right: 5px;
    }
}


.companies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 8px;
}

.companies-table th,
.companies-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.companies-table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--pink-accent);
    font-weight: 500;
    position: relative;
}

.companies-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.companies-table tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.2);
}

.companies-table tr:hover {
    background-color: rgba(255, 105, 180, 0.1);
}

.companies-table .score-cell {
    font-weight: 500;
    text-align: center;
}

.rank-cell {
    width: 50px;
    text-align: center;
}

@media (max-width: 768px) {
    .companies-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .companies-table thead {
        display: table-header-group;
    }

    .companies-table tbody {
        display: table-row-group;
    }

    .companies-table tr {
        display: table-row;
    }

    .companies-table th,
    .companies-table td {
        display: table-cell;
    }
}

.score-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, var(--pink-accent), var(--orange-accent));
    border-radius: 2px;
}

.company-link {
    color: var(--pink-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.type_mascleta .company-link {
    color: var(--orange-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.type_other .company-link {
    color: var(--purple-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.type_drones .company-link {
    color: var(--purple-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.type_mascleta.nocturna .company-link {
    color: var(--blue-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.company-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Hamburger Menu Styles */
.nav-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.nav-toggle:hover {
    transform: scale(1.05);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 5px auto;
    transition: 0.4s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    position: fixed;
    inset: 0;
    background: #4f1130;
    background: linear-gradient(135deg, #4b0b2b 0%, #3a240a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(0% at calc(100% - 3rem) 3rem);
    transition: clip-path 0.6s cubic-bezier(0.87, 0, 0.13, 1);
    z-index: 999;
    pointer-events: none;
}

.nav-menu.active {
    clip-path: circle(150% at calc(100% - 3rem) 3rem);
    pointer-events: auto;
}

.nav-menu ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.nav-menu li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s;
    transition-delay: 0s;
}

.nav-menu.active li {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu.active li:nth-child(1) { transition-delay: 0.2s; }
.nav-menu.active li:nth-child(2) { transition-delay: 0.3s; }
.nav-menu.active li:nth-child(3) { transition-delay: 0.4s; }
.nav-menu.active li:nth-child(4) { transition-delay: 0.5s; }
.nav-menu.active li:nth-child(5) { transition-delay: 0.6s; }

/* Important: These rules ensure immediate hiding when menu closes */
.nav-menu:not(.active) li {
    opacity: 0;
    transform: translateY(20px);
    transition-duration: 0s;
    transition-delay: 0s;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    transition: 0.3s;
    position: relative;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-menu a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-menu .menu-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    display: inline-block;
}

.header {
    background: transparent;
    box-shadow: none;
    padding: 35px 0 0 50px;
}



@media (max-width: 768px) {
    .nav-toggle {
        top: 1rem;
        right: 1rem; /* Changed from left to right */
        width: 40px;
        height: 40px;
    }

    .nav-toggle span {
        width: 20px;
    }

    .nav-menu a {
        font-size: 1.5rem;
    }

    .header {
        padding: 20px 0 0 20px;
    }
}


.field-row {
    display: flex;
    gap: 1rem;
    align-items: start;
    margin-bottom: 0.5rem;
}
.field-row select {
    flex: 1;
}
.new-field {
    display: none;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease-out;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.company-card {
    background-color: var(--darker-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.4s ease-out;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text-color);
    border-left: 4px solid #fff;
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.company-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #fff;
}

.company-rating {
    display: flex;
    align-items: baseline;
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.rating-max {
    margin-left: 0.25rem;
    opacity: 0.7;
}

.rating-count {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.no-ratings {
    margin-top: auto;
    font-style: italic;
    opacity: 0.7;
}

.score-bar {
    width: calc(100% - 100px);
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    margin-left: 10px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, var(--pink-accent), var(--orange-accent));
    border-radius: 2px;
}

@media (max-width: 768px) {
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.company-details {
    max-width: 800px;
    margin: 0 auto;
}

.company-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.score-card {
    background-color: var(--darker-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #fff;
}

.score-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.score-value {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
}

.score-value span {
    font-size: 1.5rem;
    opacity: 0.7;
}

.score-meta {
    margin: 0.5rem 0 0 0;
    opacity: 0.7;
}

.ratings-section {
    margin: 2rem 0;
}

.ratings-section h2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .company-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background-color: var(--darker-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #444;
    animation: fadeIn 0.4s ease-out;
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.stat-value {
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
}

.stat-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.profile-stats {
    margin-bottom: 3rem;
}

.ratings-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ratings-list {
        grid-template-columns: 1fr;
    }
}

/* Type and Date on same line */
.type-date-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.type-date-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Ensure both fields have equal width */
.type-date-row .form-group .form-control {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .type-date-row {
        gap: 0.5rem;
    }
}

/* Notes popup styling */
.notes-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: #000000ee;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
}

.notes-popup h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notes-content {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.notes-content a {
    color: var(--pink-accent);
    text-decoration: underline;
    word-break: break-word;
    transition: opacity 0.2s;
}

.notes-content a:hover {
    opacity: 0.8;
}

.type_mascleta .notes-content a {
    color: var(--orange-accent);
}

.type_other .notes-content a {
    color: var(--purple-accent);
}

.type_drones .notes-content a {
    color: var(--purple-accent);
}

.type_mascleta.nocturna .notes-content a {
    color: var(--blue-accent);
}

.close-notes {
    display: block;
    margin: 0 auto;
}

.notes-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0.4rem;
    border-radius: 50%;
    margin-top: 0.5rem;
}

.notes-icon:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.notes-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.notes-preview {
    margin-left: 4px;
    font-style: italic;
    cursor: pointer;
}

/* Ensure the icon button maintains its styling */
.notes-container .btn-icon {
    cursor: pointer;
}

/* Ensure popup overlay covers the entire screen */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 999;
}

/* Floating Action Button Styles */
.floating-action-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-accent), var(--orange-accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 900;
    text-decoration: none;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.floating-action-button:hover,
.floating-action-button:focus {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.floating-action-button:active {
    transform: translateY(0) scale(0.95);
}

/* Add space at the bottom of the page to avoid the FAB covering content */
main {
    padding-bottom: 100px;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .floating-action-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--pink-accent);
    border-radius: 4px;
    background-color: var(--input-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.2s, transform 0.1s;
}

.form-checkbox:checked {
    background-color: var(--pink-accent);
    border-color: var(--pink-accent);
}

.form-checkbox:checked::after {
    content: '✓';
    font-size: 16px;
    color: white;
    position: absolute;
}

.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.25);
}

.form-checkbox:hover {
    transform: scale(1.05);
}

.type_mascleta .form-checkbox {
    border-color: var(--orange-accent);
}

.type_mascleta .form-checkbox:checked {
    background-color: var(--orange-accent);
    border-color: var(--orange-accent);
}

.type_other .form-checkbox {
    border-color: var(--purple-accent);
}

.type_other .form-checkbox:checked {
    background-color: var(--purple-accent);
    border-color: var(--purple-accent);
}

.type_drones .form-checkbox {
    border-color: var(--purple-accent);
}

.type_drones .form-checkbox:checked {
    background-color: var(--purple-accent);
    border-color: var(--purple-accent);
}

.type_mascleta.nocturna .form-checkbox {
    border-color: var(--blue-accent);
}

.type_mascleta.nocturna .form-checkbox:checked {
    background-color: var(--blue-accent);
    border-color: var(--blue-accent);
}

.slider-container.unlocked .rating-slider::-webkit-slider-thumb {
    background: #fff;
    border: 2px solid #000;
}

/* Update the slider cover to be invisible but still functional */
@media (max-width: 768px) {
    .slider-cover {
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        z-index: 5;
        cursor: pointer;
        transition: all 0.2s ease;
        /* Make it invisible but keep it functional */
        background-color: transparent;
        /* Ensure info icons can be clicked by preventing pointer events on the cover */
        pointer-events: auto;
    }

    /* Remove the text entirely */
    .slider-cover-text {
        display: none;
    }

    .slider-container.unlocked .slider-cover {
        opacity: 0;
        pointer-events: none;
    }

    /* Ensure info icons are always clickable by raising their z-index */
    .info-icon {
        position: relative;
        z-index: 10;
        pointer-events: auto;
    }
}