:root {
    --primary: #0EA74B;
    --black: #222;
}

* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    font-size: 19px;
    min-width: 320px;
}
body {
    background: #fff;
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    line-height: 1.4;
    color: var(--black);
}

a {
    color: var(--primary);
    text-decoration: none;
}
    a:hover {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 5px;
        color: var(--black);
    }

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.3;
    margin: 10px 0 30px 0;
}

h1 {
    font-size: 2rem;
}
h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

p {
    margin: 0.5rem 0 1.1rem 0;
}

hr {
    background: #e3d2af;
    border: 0;
    height: 1px;
    margin: 45px 0;
}

fieldset {
    padding: 0;
    margin: 0;
    border: 0;
}

select {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    background: #fff;
    color: var(--black);
}
select:focus {
    border-color: var(--primary);
    outline: none;
}

input {
    accent-color: var(--black);
}

table {
    border-collapse: collapse;
    width: 100%;
    border-radius: 5px;
}
    th, td {
        padding: 8px 20px;
        text-align: left;
        vertical-align: top;
    }
    th {
        background: #f4f4f4;
    }
    td {
        background: #fff;
    }

.table-wrap {
    max-width: 100%;
    overflow-x: scroll;
    overflow-y: auto;
}

code {
    padding: 0 10px;
    border-radius: 10px;
}
    pre {
        border-radius: 10px;
        max-width: 100%;
    }
    pre code {
        display: block;
        overflow: scroll;
        max-height: 50vh;
    }
    code:not(pre code) {
        background: #edfbf3;
        display: inline-block;
    }
sup a {
    text-decoration: none;
    padding: 0;
    text-decoration-thickness: 0;
    text-underline-offset: 0;
}

input[type=text], input[type=url], textarea {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
}
button {
    font-size: 1rem;
    border: 0;
    cursor: pointer;
}

ul.flat {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

button, .button {
    background: var(--black);
    text-decoration: none;
    color: #fff;
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    border: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
    button:hover,
    .button:hover {
        background: var(--primary);
        color: #fff;
        text-decoration: none;
    }
    .button img {
        height: 20px;
        margin-right: 5px;
        display: inline-block;
        vertical-align: middle;
        filter: brightness(0) invert(1);
    }

button.small {
    font-size: 0.875rem;
    padding: 10px 20px;
}

.icon-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.55;
}

.icon-button:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.icon-button img {
    max-height: 18px;
    vertical-align: middle;
}

@keyframes shake {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(1em);
    }
    40% {
        transform: translate(-1em);
    }
    60% {
        transform: translate(0.5em);
    }
    80% {
        transform: translate(-0.5em);
    }
    100% {
        transform: translate(0);
    }
}


.autocomp {
    background: #f8f8f8;
    border-radius: 0 0 5px 5px;
    border: 1px solid #ccc;
    border-top: 0;
    box-shadow: 2px 2px 2px #eee;
    text-align: left;
}
.autocomp-item {
    padding-bottom: 5px;
    padding: 10px;
    cursor: pointer;
}
.autocomp-item:hover,
.autocomp-sel {
    background: #f1f1f1;
    font-weight: bold;
}

.ellip {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    text-overflow: ellipsis;
}
.box {
    box-shadow: 1px 1px 4px #eee;
    border-radius: 5px;
    border: 2px solid #eee;
    padding: 15px 20px;
}
    .text-small {
        font-size: 0.875rem;
    }
    .text-grey {
        color: #888;
    }

.tags a {
    background-color: #e1fdec;
    color: var(--primary) !important;
    display: inline-block;
    margin: 0 5px 10px 0;
    text-decoration: none;
    border-radius: 30px;
    padding: 3px 15px;
    font-size: 0.875rem;
}
    .tags a:hover {
        background-color: var(--primary);
        color: #fff !important;
    }

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

.message {
    background: #fffaf0;
    border: 1px solid #f8c481;
    color: #ae7a13;
    padding: 15px;
}
.error {
    background: #fbefef;
    color: #b23f3f;
    border: 1px solid #fecaca;
}
.success {
    background: #ecfff4;
    color: var(--primary);
    border: 1px solid #aee1c3;
}

.pagination {
  margin-top: 30px;
}
  .pagination a {
    display: inline-block;
    text-decoration: none;
  }
  .pagination .pg-page {
    padding: 0 6px;
  }
  .pagination .pg-selected {
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
  }
  .pagination.top {
    margin-bottom: 30px;
  }
  .pagination.bottom {
    margin-top: 30px;
  }

.mast {
    background: #f4f4f4;
}
    .mast .tabs .tab {
        background: #eee;
        display: inline-block;
        margin-right: 5px;
        max-width: 225px;
    }
    .mast .tabs .tab:hover span {
        text-decoration: underline;
    }
    .mast .tabs .tab.sel {
        background: #fff;
    }
    .mast .tabs .tab span {
        padding: 10px 30px 4px 30px;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1;
    }

.main {
    margin-top: 45px;
    margin-bottom: 30px;
}

.container-fluid {
    max-width: 1200px;
}

.header {
    padding: 30px 0 0 0;
    overflow: hidden;
}
    .header .bar {
        margin-bottom: 45px;
    }
        .header .nav a {
            margin-left: 30px;
            text-decoration: none;
        }
    .header .title {
        margin: 0 0 30px 0;
    }
    .header .heading .title {
        margin: 0;
    }
    .header .subheading {
        margin-bottom: 30px;
    }

.logo img {
    max-height: 32px;
    transition: transform 0.7s ease-in-out;
    margin-right: 10px;
    vertical-align: middle;
}
    .logo img:hover {
      transform: rotate(30deg); /* Full rotation on hover */
    }
    .logo a {
        text-decoration: none;
        color: var(--black);
    }

.intro {
    margin: 15vh 0 60px 0;
}
    .intro .title {
        margin: 0 0 15px 0;
    }
    .intro h2 {
        margin: 0 0 15px 0;
    }
    .intro p {
        color: #777;
        font-size: 1.3rem;
    }
    .intro .name span {
        color: var(--primary);
    }
    .intro code {
        padding: 0;
        background: none;
    }

.search {
    margin-bottom: 60px;
    position: relative;
}
    .search .more {
        display: none;
    }
    .search:has(#type-project:checked) .more {
      display: block;
    }
    .search .input {
        margin-bottom: 8px;
        display: flex;
    }
    .search .input input {
        border-radius: 5px 0 0 5px;
        border: 2px solid #ccc;
    }
    .search button {
        border-radius: 0 5px 5px 0;
    }
    .search .q {
        padding: 10px;
    }
    .search .tabs {
        font-size: 0.875rem;
        margin-left: 10px;
        margin-bottom: -1px;
        z-index: 2;
    }
    .search .tabs .tab {
        border: 1px solid #ddd;
        border-bottom: 0;
        border-radius: 3px 3px 0 0;
    }
    .search .tabs .tab span {
        padding: 6px 15px 3px 15px;
    }
    .search label {
        cursor: pointer;
    }

table .filter {
    display: flex;
}

    table .filter button {
        border-top-left-radius: 0px;
        border-bottom-left-radius: 0px;
    }

    table .filter input {
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;

        padding-top: 0;
        padding-bottom: 0;
    }

.home .updates .block {
    margin-top: 90px;
}
    .home .updates .block:last-child {
        margin-bottom: 0;
    }

.validate textarea {
    height: 50vh;
}
.validate .message {
    display: none;
}

/* Search results */
.results ul {
    list-style-type: none;
    padding: 0;
}
    .results .result {
        margin-bottom: 30px;
        padding: 20px;
        border: 1px solid #ddd;
    }
    .results .title {
        margin: 0;
    }
    .results p:last-child {
        margin-bottom: 0;
    }
    .results .props {
/*        text-align: right;*/
    }
        .results .props .license {
            vertical-align: top;
            line-height: 1;
        }
        .results .props img {
            max-height: 18px;
            vertical-align: top;
        }
        .results .props a {
            display: inline-block;
            margin-left: 15px;
            opacity: 0.4;
        }
        .results .props a:hover {
            opacity: 1;
        }
.meta {
}
    .meta a {
        color: #888;
    }
    .meta .item {
        margin: 0 0 10px 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .meta img {
        max-height: 18px;
        vertical-align: middle;
        opacity: 0.5;
        margin-right: 5px;
    }


.project .props .block {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    margin-bottom: 30px;
}
    .project .props .block:last-child {
        border: 0;
        margin-bottom: 0;
    }
    .project .block .title {
        margin: 0 0 15px 0;
    }

.plans {
    margin-bottom: 60px;
}
    .plans .amount {
        text-align: right;
    }
    .plans .channel-type ul {
        margin: 0;
        padding: 0 0 0 15px;
    }

.channels tr:target td {
   background-color: #ecfff4;
   font-weight: 500;
   animation: shake 200ms ease-in-out;
   animation-iteration-count: 2;
}

/* Browse directory */
.browse .order select {
    display: inline-block;
    width: auto;
}

.footer {
    color: #999;
    font-size: 0.875rem;
    margin-top: 5vh;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}
    .footer a {
        text-decoration: none;
    }

.container-fluid.floating {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}

.container-fluid.floating:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    padding: 0;
}

.modal-close:hover {
    color: var(--black);
}

.modal-close:checked ~ .modal-overlay {
    display: flex;
}


.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-footer button {
    margin-left: 10px;
}

.modal-toggle {
    display: none;
}

.modal-overlay {
    display: none;
}


.modal-toggle:checked ~ .modal-overlay {
    display: flex;
}

@media (max-width: 500px) {
    .modal {
        width: 95%;
    }

    .container-fluid.floating {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 500px) {
    h1 {
        font-size: 1.6rem;
    }
    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .container-fluid {
        padding: 15px;
        margin: 0;
    }
    .row {
        margin-right: 0;
        margin-left: 0;
    }
    .header {
        padding: 10px 0 0 0;
    }
    .header .logo {
        text-align: center;
        margin: 10px 0;
    }
    .header .nav {
        text-align: center;
    }
    .header .nav a {
        margin: 0 10px;
    }
    .header .heading {
        margin-bottom: 15px;
    }
    .header .subheading {
        margin-bottom: 0px;
    }
    .search {
        margin-bottom: 30px;
    }
    .intro {
        margin: 0;
    }
    .results .result {
        padding: 15px;
    }
    .mast .tabs .tab {
        display: block;
        width: 100%;
        max-width: none;
        border-bottom: 1px solid #ccc;
    }
    .mast .tabs .tab:last-child {
        border-bottom: 0;
    }

    .results .props {
      display: flex;
      align-items: center;
    }

    .results .props > *:first-child {
      flex-grow: 1;
    }
 }
