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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background: #f8f9fa;
    color: #333;
    padding: 20px;
    min-height: 100vh;
}

.header {
    display: flex;
    /*
     j ustify-conten*t: space-between;
     align-items: center;
     */
    margin-bottom: 40px;
    padding: 0 20px;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    align-items: flex-start;
    flex-direction: column;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
}

.filter-btn {
    background: #4a6ee0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(74, 110, 224, 0.3);
    transition: all 0.3s ease;
    align-self: flex-start; /* Changed from center to flex-start */
    margin-top: 10px;
}

.filter-btn:hover {
    background: #3a5ac8;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 110, 224, 0.4);
}

.distro-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.distro-grid {
    display: flex;
    flex-wrap: wrap;
    /*display: grid;
     grid-template-*columns: repeat(4, 90px);*/
    gap: 40px;
    margin-bottom: 40px;
    justify-items: center;
    justify-content: center;
    max-width: calc(4 * 90px + 3 * 40px); /* Limit width to exactly 4 columns */
    margin: 0 auto;
}

/*.distro-row {
 d isplay: flex;*
 flex-wrap: wrap;
 justify-content: center;
 gap: 30px;
 margin-bottom: 40px;
 }*/

.distro-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    transition: transform 0.3s, filter 0.3s;
    cursor: pointer;
    /*display: inline-block;
     w idth: 70px;  *
     max-width: 25vw;
     aspect-ratio: 1 / 1;
     /*
      b ackground: wh*ite;
      border-radius: 12px;
      padding: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      */
}

.distro-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: none;
    transition: filter 0.3s;
}

.distro-link:hover {
    transform: scale(1.15);
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);*/
}

.distro-link.grayscale img {
    filter: grayscale(100%) brightness(1.2);
}

.distro-link.hidden {
    display: none;
}

.tux {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    z-index: 10;
}

.tux img {
    width: 30px;
    height: auto;
    transition: transform 0.5s;
}

.tux:hover img {
    transform: rotate(10deg);
}

/* Side panel styles */
.side-panel {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow-x: hidden;
    overflow-y: hidden; /* Add this - prevent panel from scrolling */
    transition: 0.4s;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    border-left: 1px solid #e9ecef;
}

.side-panel-header {
    position: fixed;
    top: 0;
    right: -475px;
    width: 475px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 0px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
    z-index: 101;
    transition: right 0.4s;
}

.side-panel-content {
    padding: 20px 30px 30px;
    color: #333;
    text-align: left;
    /*     height: 100%; */
    height: calc(100% - 40px); /* Add this - adjust based on header height */
    margin-top: 40px; /* Add this - same as height reduction */
    overflow-y: auto;
    box-sizing: border-box; /* Ensure padding is included in height calculation */
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5a6268;
}

.close-btn {
    font-size: 36px;
    color: #6c757d;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #4a6ee0;
}

.distro-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.distro-logo {
    width: 90px;
    height: 90px;
    margin-right: 25px;
    object-fit: contain;
    /*
     b ackground: wh*ite;
     border-radius: 12px;
     padding: 10px;
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
     border: 1px solid #e9ecef;
     */
}

.distro-title {
    font-size: 28px;
    margin: 0;
    color: #2c3e50;
}

.distro-url {
    display: block;
    margin-top: 5px;
    color: #4a6ee0;
    text-decoration: none;
    font-size: 14px;
}

.distro-url:hover {
    text-decoration: underline;
}

.distro-info {
    margin-bottom: 35px;
}

.distro-info p {
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 14px;
    color: #555;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px; /*15px;*/
    margin: 15px 0; /*20px 0;*/
}

.info-item {
    /*background: rgba(108, 117, 125, 0.08);*/
    /*padding: 12px;*/
    padding: 4px 0 4px 15px; /*8px 0 8px 15px;*/
    /*border-radius: 8px;
     border: 1px so*lid #e9ecef;*/
    border-left: 2px solid #e9ecef;
    font-size: 14px;
}

.info-label {
    font-weight: bold;
    color: #2c3e50; /*#4a6ee0;*/
    display: block;
    margin-bottom: 3px; /*5px;*/
    font-size: 14px;
}

/* Package Freshness Bar Styles */
.freshness-section {
    margin: 8px 0;
    padding: 4px 0 4px 15px;
    border-left: 2px solid #e9ecef;
    font-size: 14px;
    background: none; /* Remove background */
}

.freshness-bar-container {
    margin-top: 3px;
    width: 40%; /* Much shorter - about half or less */
}

.freshness-bar {
    position: relative;
    height: 8px;
    background: linear-gradient(to right,
                                rgba(255, 0, 0, 0.2) 0%,
                                rgba(255, 255, 0, 0.2) 20%,
                                rgba(0, 255, 0, 0.2) 40%,
                                rgba(0, 255, 255, 0.2) 60%,
                                rgba(0, 0, 255, 0.2) 80%,
                                rgba(127, 0, 255, 0.2) 100%);
    border: 2px solid #666;
    border-radius: 4px;
    margin: 5px 0;
    overflow: visible;
}

.freshness-indicator {
    position: absolute;
    top: -5px;
    bottom: -5px;
    transform: translateX(-50%);
    width: 3px;
    background: #2c3e50;
    border: none;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.freshness-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
}

.freshness-description {
    text-align: left; /* Match other specs alignment */
    font-weight: normal;
    color: #333;
    margin-top: 0px; /* Remove top margin since it's now above */
    margin-bottom: 10px; /* Add space below the description */
    font-size: 0.85rem;
}

.derivative-categories {
    margin-top: 35px;
}

.derivative-categories h3 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 22px;
    color: #2c3e50;
}

.derivative-category {
    margin-bottom: 25px;
}

.derivative-category h4 {
    color: #2c3e50; /*#4a6ee0;*/
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 14px;
}

.derivatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 30px;
}

.derivative {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
    /*padding: 10px;
     b order-radius:* 10px;
     background: rgba(108, 117, 125, 0.05);
     border: 1px solid #e9ecef;*/
}

.derivative:hover {
    transform: scale(1.1);
    /*background: rgba(108, 117, 125, 0.1);
     box-shadow: 0 *2px 8px rgba(0, 0, 0, 0.1);*/
}

.derivative img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
}

.derivative span {
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    color: #333;
}

/* Filter dialog styles */
.filter-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.filter-dialog.active {
    opacity: 1;
    visibility: visible;
}

.filter-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s;
    border: 1px solid #e9ecef;
}

.filter-dialog.active .filter-content {
    transform: translateY(0);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
}

.filter-title {
    font-size: 24px;
    color: #2c3e50;
}

.close-filter {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-filter:hover {
    color: #4a6ee0;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.filter-group {
    text-align: left;
}

.filter-group h3 {
    margin-bottom: 15px;
    color: #2c3e50; /*#4a6ee0;*/
    font-size: 18px;
}

.filter-checkbox {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.filter-checkbox input {
    margin-right: 10px;
    transform: scale(1.2);
}

.filter-checkbox label {
    cursor: pointer;
    font-size: 16px;
    color: #333;
}

.filter-radio-group {
    margin-bottom: 20px;
}

.filter-radio-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.filter-radio-options {
    display: flex;
    gap: 20px;
    margin-left: 10px;
}

.filter-radio {
    display: flex;
    align-items: center;
}

.filter-radio input {
    margin-right: 6px;
    transform: scale(1.2);
}

.filter-radio label {
    cursor: pointer;
    font-size: 16px;
    color: #333;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.filter-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.filter-btn-secondary:hover {
    background: #5a6268;
}

.filter-btn-primary {
    background: #4a6ee0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.filter-btn-primary:hover {
    background: #3a5ac8;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .distro-link {
        width: 70px;
    }

    .side-panel {
        width: 100% !important;
    }

    .side-panel-header {
        width: 100%;
        right: -100%;
    }

    .distro-header {
        flex-direction: column;
        text-align: center;
    }

    .distro-logo {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .filter-radio-options {
        gap: 15px;
    }
}
