input {
    width: 90%;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: text;
    font-size: 16px;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.card {
    position: relative;
    max-width: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .4);
    background-color: #141414;
    margin: 20px auto;
    display: none;
}

.card__vid {
    display: block;
    width: 100%;
    height: 240px;
    max-width: 100%;
    object-fit: contain;
}

/* Styles for video placeholder */
.card__vid-placeholder {
    position: relative;
    width: 100%;
    height: 240px;
    background-color: #000;
    background-size: cover;
    background-position: center;
}

.card__vid-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55C3.97,2.33,2.27,4.81,1.48,7.74,0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42-6.19C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="%23ff0000" fill-opacity="0.8"></path><path d="M 45,24 27,14 27,34" fill="%23fff"></path></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.2s ease-out;
}

.card__vid-placeholder:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
}

.card__body {
    padding: 40px;
}

.card__title {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 21px;
    font-weight: 700;
    transition: color .3s;
}

.card__title:hover {
    color: orange;
}

.card__desc {
    font-size: 16px;
    margin: 0;
}

/* Like Button Styles */
.card__like-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card__like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #888;
    transition: color 0.3s, transform 0.2s;
    padding: 0;
    margin-right: 8px;
}

.card__like-btn.liked {
    color: #e74c3c;
}

.card__like-btn:hover {
    transform: scale(1.1);
    color: #e74c3c;
}

.card__like-count {
    color: #ccc;
    font-size: 18px;
    font-weight: bold;
}

.search-container {
    margin-bottom: 20px;
}

.sort-container {
    margin-bottom: 20px;
}

input[type="text"] {
    background-color: #141414;
    color: white;
    width: 90%;
    height: 40px;
    border-style: solid;
    border-radius: 10px;
    border-color: orange;
    font-size: 16px;
    padding: 0 10px;
    cursor: text;
}

select {
    width: 90%;
    height: 40px;
    border-radius: 10px;
    border-color: orange;
    font-size: 16px;
    padding: 0 10px;
    background-color: #141414;
    color: white;
    cursor: pointer;
}

.card[data-recipeunchecked]::before {
    content: "Не перевірено";
    position: absolute;
    left: 10px;
    background-color: orange;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 10;
}

#pagination-controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-btn {
    background: orange;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.pagination-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

#page-info {
    font-size: 18px;
}

#searchResultsCount {
    margin-top: 10px;
    font-size: 18px;
    color: #ffa516;
}

/* Styles for the new timer */
.card__timer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffa516;
    /* Orange color for the timer */
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
}

.card__timer span {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 8px;
    /* Adjust spacing between units */
    padding: 5px;
    background-color: rgba(255, 165, 0, 0.1);
    /* Light orange background */
    border-radius: 8px;
    min-width: 50px;
    /* Ensure minimum width for each unit */
}

.card__timer .value {
    font-size: 1.5em;
    /* Larger font for the numbers */
    margin-bottom: 3px;
}

.card__timer .label {
    font-size: 0.7em;
    /* Smaller font for labels */
    text-transform: uppercase;
}

/* Responsive adjustments for timer */
@media (max-width: 600px) {
    .card__timer {
        font-size: 1em;
    }

    .card__timer span {
        margin: 0 4px;
        min-width: 40px;
    }

    .card__timer .value {
        font-size: 1.2em;
    }

    .card__timer .label {
        font-size: 0.6em;
    }
}

/* --- Admin Panel Styles --- */
#adminPanel {
    background-color: #141414; /* Same as .card */
    padding: 30px;
    border-radius: 12px;
    margin: 20px auto; /* Match .card margin */
    width: 90%; /* Match search inputs width */
    max-width: 800px;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .4); /* Same as .card */
    position: relative;
}

#adminPanel h2 {
    color: orange;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    font-weight: 700;
    font-size: 24px;
}

#adminPanel h3 {
    margin-top: 0;
    color: #ddd;
    font-weight: normal;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#adminPanel button {
    border: none;
    padding: 10px 20px;
    border-radius: 10px; /* Same as input/select */
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, opacity 0.2s;
}

#adminPanel button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

#adminMigrateBtn {
    background: #2980b9;
    color: white;
}

#adminAddBtn {
    background: linear-gradient(to right, #FFA600, #FFBB00);
    color: black;
}

#adminSaveBtn {
    background: linear-gradient(to right, #FFA600, #FFBB00);
    color: black;
}

#adminCancelBtn {
    background: #7f8c8d;
    color: white;
}

#adminEditor {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

#adminEditor label {
    display: block;
    color: #888;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Reuse existing input styles, but ensure specificity */
#adminEditor input,
#adminEditor textarea,
#adminEditor select {
    background-color: #0a0a0a;
    color: white;
    width: 100%;
    height: auto; /* Allow auto height for textarea */
    min-height: 40px; /* Base height for inputs */
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    margin-bottom: 0; /* Override generic input margin if needed */
    font-family: inherit;
    transition: border-color 0.3s;
}

#adminEditor input:focus,
#adminEditor textarea:focus {
    border-color: orange;
    outline: none;
}

#adminEditor textarea {
    resize: vertical;
}

/* Checkbox specific override */
#adminEditor input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: orange;
    margin-right: 10px;
    cursor: pointer;
    vertical-align: middle;
    min-height: auto;
}

/* Admin Card Actions */
.admin-card-actions {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    display: flex;
    gap: 10px;
    z-index: 20;
    position: relative;
    align-items: center;
}

.admin-edit-btn, .admin-delete-btn {
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.admin-edit-btn {
    background: linear-gradient(to right, #FFA600, #FFBB00);
    color: black;
}
.admin-edit-btn:hover {
    opacity: 0.9;
}

.admin-delete-btn {
    background: #c0392b;
}
.admin-delete-btn:hover {
    background: #e74c3c;
}

.admin-card-id {
    margin-left: auto;
    color: #666;
    font-size: 12px;
}
