*{box-sizing: border-box;}
/* Общие стили */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
}

.section-title {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    font-weight: bold;
    

    color: #333;
}

/* Панель поиска */
.search-bar {
    min-width: 600px;
    padding: 20px 0;
    text-align: center;
    

}

header {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 5px 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    background: #fff;
    justify-content: space-between;
    padding: 0 30px; /* Горизонтальные отступы слева и справа */
    align-items: center;
    flex-wrap: nowrap;
    padding: 0 15px;

    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px; /* немного отступов на мобилках */
}

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%; /* можешь подогнать под ширину хедера */
    max-width: 300px;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
}

.marquee {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 20s linear 1;
    animation-delay: 8s;
    color: #444;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.8;
    margin-left: 30px; /* Подвинет чуть правее */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    90% {
        transform: translateX(-150%);
    }
    100% {
        transform: translateX(-200%);
    }
}




.logo{
    cursor: pointer;
    background: url('../favicon.ico') no-repeat left center;
    background-size:auto  100%;
    min-width: 200px;
    line-height: 50px;
    padding-left: 58px;
        font-weight: bold;
}
.head-left{
    display: flex;
    align-items: center;
    cursor: default;
}
.head-right a {
  display: block;
  padding: 10px 0 10px 25px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  font-weight: normal;
  text-align: left;
  background: url('tg.png') no-repeat left center;
    background-size: auto;
  background-size: auto 60%;
}

.head-right2{
    min-width: 200px;
}


.head-right2 a {
    font-size: 0.9em;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.head-right2 a:hover {background-color: #cce6ff;}

.head-right2 a.active {
  font-weight: bold;
  color: #0066cc; /* можешь поменять */
  border-bottom: 2px solid #0066cc;
}
.head-right2 a.active:hover {background-color: #eee;}

.search-bar input[type="text"] {
    padding: 10px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-bar button {
    padding: 10px 30px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #004d99;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
    max-WIDTH: 400px;
  width: 100%;
}

.search-input-wrapper input {
    padding-right: 28px;
}

#clearSearch {
    position: absolute;
    right: 10px;
    top: 45%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #888;
    user-select: none;
    transition: color 0.2s;
}

#clearSearch:hover {
    color: #000;
}


/* Контейнер карточек */
.results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.pinned-row {
    padding-bottom: 32px;
    border-bottom: 2px solid #eee;
}

.search-row {
    
}


/* Карточка предмета */
.card {
    flex: 0 0 280px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 12px 62px 12px;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 250px;

    opacity: 0; /* На всякий случай */
    animation: fadeInUp 0.4s ease-out forwards;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card::before {
    content: "r2db.online"; /* или "Default БАЗА" */
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.2);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    pointer-events: none;
    z-index: 0;
}

.card-body,
.card-header {
    position: relative;
    z-index: 1;
}

.card .desc{
    font-size: 80%;
    margin-bottom: 8px;
    background: #f0f3ff;
    padding: 5px;
    border-radius: 5px;
    letter-spacing: 1px;
}
.card:hover {
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.card-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    flex-grow: 1;
}

.card .mini{
    font-size: 80%;
    color: #777;
}


.card-body div {
    margin-bottom: 2px;
    font-size: 0.95rem;
}




.heightblock{
    display: block;
    height: 5px;
}


.pin-icon {
    position: relative;
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
}

.pin-icon span {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.25s ease;
    font-size: 1.1em;
}

.pin-locked {
    opacity: 1;
}

.pin-unlocked {
    opacity: 0;
}

.pin:hover .pin-locked {
    opacity: 0;
}

.pin:hover .pin-unlocked {
    opacity: 1;
}

.toggle-pinned {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 1.2rem;
  margin-left: 12px;
}

.toggle-pinned input {
  display: none;
}

.toggle-pinned .icon {
  transition: transform 0.2s ease;
}

.toggle-pinned:hover .icon {
  transform: scale(1.2);
}

#pinnedToggleIconWrapper{
    cursor: pointer;
    margin-right: 10px;
    user-select: none;
    width: 100%;
  text-align: center;
 }

.hidePinnedlabel {
  display: none;
}


a.clear-pinned {
    margin-left: 10px;
    font-size: 0.7rem;
    text-decoration: none;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    color: #555;
}

a.clear-pinned:hover {
    opacity: 1;
    cursor: pointer;
}


.card-body .slayer-title {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

.card-body .slayer-info {
    font-size: 0.8rem;
    margin-left: 10px;
    color: #444;
}

.refine-section {
    display: flex;
    flex-wrap: wrap;
    position: absolute;
    width: 100%;
    bottom: 10px;
    left: 0px;
    margin-top: 20px;
    justify-content: center;
}
.refine-box {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 1px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.refine-text {
    position: absolute;
    cursor: default;
    width: 40px;
    height: 40px;
    padding-top: 14px;
    text-align: center;
    color: white;
    font-size: 12px;
    text-shadow: 0px 0px 3px black,0px 0px 3px black,0px 0px 12px black,0px 0px 2px black, 0 0 1em black, 0 0 0.2em black;
    cursor: pointer;
}
.refine-blessed {
    position: absolute;
    bottom: 0px;
    left: 0px;
    color: white;
    font-size: 12px;
    background:rgba(255,222,1,0.18);
    cursor: pointer;
}
.welcome-block {
    background: #f9f9f9;
    border-left: 4px solid #caa300;
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 500px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    border-radius: 6px;
}

.welcome-block {
    background: #f9f9f9;
    border-left: 4px solid #0066cc;
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 500px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    border-radius: 6px;
}

.welcome-block h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0066cc;
}

.welcome-block a {
    color: #004c99;
    text-decoration: none;
    border-bottom: 1px dotted #004c99;
}

.welcome-block a:hover {
    color: #007fff;
    border-bottom: 1px solid #007fff;
}



.monster-detail-card {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.monster-big-img {
    width: 100%;
    max-width: 50px;
    margin-bottom: 10px;
}
.back-button {
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: none;
}
.monster-details li {
    margin-bottom: 5px;
}



.drop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
  color: #000;
}
.drop-info {
    font-size: 0.9rem;
}

.simple-drop-list {
    max-width: 700px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.drop-icon {
    width: 64px;
    height: 64px;
    margin-right: 15px;
}
.drop-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
}

.drop-header img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ccc;
    margin-right: 15px;
}

.drop-header .drop-info h2 {
    margin: 0;
    font-size: 1.4rem;
}

.drop-header .drop-info p {
    margin: 4px 0 0;
    color: #666;
    font-size: 0.95rem;
}

.mob-drop-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mob-drop-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.mob-drop-list li:first-child {
    border-top: none;
}

.mob-drop-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
    transition: background 0.2s;
    padding: 4px;
    border-radius: 6px;
}

.mob-drop-list a:hover {
    background: #f5faff;
}

.mob-drop-list img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-right: 10px;
}

.mob-name {
    font-weight: bold;
    flex: 1;
}

.mob-level {
    margin-right: 10px;
    color: #777;
    font-size: 0.9rem;
}

.mob-chance {
    font-size: 0.95rem;
    color: #0066cc;
    font-weight: 500;
}


.img {
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.img-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255,222,1,0.25);
    top: 0;
    left: 0;
    border-radius: 4px;
}
.monster-detail-layout {
    display: flex;
    flex-wrap: wrap;
    padding: 30px;

}

.monster-info-left {
    flex: 1 1 50%;
    min-width: 300px;

}

.monster-drop-right {
    flex: 1 1 35%;
    min-width: 250px;
    background: #f7f7f7;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}
.monster-details { padding: 20px; background: #fff; margin: 0 auto; max-width: 1400px; border-radius: 10px; box-shadow: 0 0 10px #ccc;width: 100%;}
.monster-header{display: block;height: 70px;}
.monster-header img { width: 70px; float: left; margin-right: 20px; }
.monster-header h2 { margin: 0; }
.monster-section { margin-top: 20px; }
.monster-section-top h2 {margin: 0 0 10px 0;}

.back-btn { display: block; margin-bottom: 10px; color: #0066cc; text-decoration: none;text-align: center;}

.more-btn {
    width: 150px;
    display: block;
    margin: 60px auto 0;
    padding: 6px 12px;
    background-color: #9cbedf;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.more-btn:hover {
    background-color: #005bb5;
}


.race-link{
    color: #0066cc;
    text-decoration: none;
}

.back-btn {
    display: inline-block;
    margin: 15px 0;
    text-decoration: none;
    font-size: 1rem;
    color: #0066cc;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.5s;
}

.back-btn:hover {
    background: #ececec;
}


#refine-emoji-flash {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 9999;
}
@keyframes shakeFade {
  0%   { transform: translateX(-50%) translateY(-50%); opacity: 0; }
  10%  { opacity: 1; }
  20%  { transform: translateX(-60%) translateY(-50%); }
  40%  { transform: translateX(-40%) translateY(-50%); }
  60%  { transform: translateX(-60%) translateY(-50%); }
  80%  { transform: translateX(-40%) translateY(-50%); }
  100% { transform: translateX(-60%) translateY(-50%); opacity: 0; }
}

@keyframes dropFade {
  0%   { transform: translateX(-50%) translateY(-40px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateX(-50%) translateY(0); opacity: 0; }
}

.emoji-fail {
  animation: shakeFade 0.3s ease-in-out forwards;
  position: fixed;
}

.emoji-success {
  animation: dropFade 1s ease-out forwards;
  position: fixed;
}

@keyframes fadeScale {
  0% { opacity: 0; transform: translateX(-50%) scale(0.8); }
  20% { opacity: 1; transform: translateX(-50%) scale(1.1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.3); }
}

.fail-counter-anim {
  animation: fadeScale 1.4s ease-out forwards;
}
@keyframes counterBoom {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
  }
  50% {
    transform: translateX(-50%) scale(var(--boom-scale, 1.3));
    color: red;
  }
  80% {
    transform: translateX(-50%) translateY(calc(-1 * var(--boom-distance, 15px))) scale(1);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px) scale(1.5) rotate(25deg);
  }
}

.fail-counter-anim {
  animation: counterBoom 0.5s ease-out forwards;
  transition: transform 0.2s;
}
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.9;
  z-index: 9999;
  animation: confetti-explode 0.8s ease-out forwards;
}

@keyframes confetti-explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.8);
    opacity: 0;
  }
}



@keyframes pop-boom {
  0% {
    transform: scale(1) translateX(-50%);
    opacity: 0;
  }
  30% {
    transform: scale(1.3) translateX(-50%);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateX(-50%);
    opacity: 0;
  }
}


.drop-item.pulse-highlight {
    position: relative;
    z-index: 1;
}

.drop-item.pulse-highlight::before,
.drop-item.pulse-highlight::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100px;
    width: 60px;
    height: 60px;
    background: rgba(0, 123, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 1.8s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

.drop-item.pulse-highlight::after {
    animation-delay: 0.6s;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.9;
    }
    80% {
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}
.main-hub {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 0px 30px 30px 30px;
    border-radius: 16px;
    width: 1000px;
    margin: 20px auto;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    text-align: center;
}

.main-hub h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #0066cc;
}

.hub-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.hub-block {
    flex: 1 1 300px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    text-align: left;
    transition: transform 0.2s ease;
}

.hub-block:hover {
    transform: translateY(-3px);
}

.hub-block h3 {
    font-size: 1.2rem;
    margin-top: 0;
    color: #333;
    margin-bottom: 12px;
}

.hub-block ul {
    list-style: none;
    padding-left: 0;
}

.hub-block li {
    margin-bottom: 10px;
}

.hub-block a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
  align-items: center;
}
.hub-block a img{padding-right: 8px;}

.hub-block a:hover {
    text-decoration: underline;
}
.hub-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.hub-left {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hub-right {
    flex: 1 1 300px;
}


.race-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.race-buttons.vertical {
    flex-direction: column;
}

.race-btn {
    background: linear-gradient(to right, #f0f0f0, #e0e0e0);
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.race-btn::after {
    content: '';
    position: absolute;
    background: rgba(0, 102, 204, 0.1);
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    transition: left 0.3s ease;
    z-index: 0;
}

.race-btn:hover::after {
    left: 0;
}

.race-btn:hover {
    color: #0066cc;
    border-color: #0066cc;
    background: linear-gradient(to right, #e6f3ff, #d0e8ff);
    text-decoration: none !important;
}







.enchant-filters {
    margin: 20px auto;
    text-align: center;
    font-size: 16px;
}


.enchant-btn {
    background: linear-gradient(to bottom, #ddd, #fff);
    color: #000;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.enchant-btn:hover {
    background: #ddd;
    color: #000;
    transform: translateY(-1px);
}

.enchant-btn.active {
    background: #5571ff;
    color: #fff;
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.mini-icon img{ width: 50px; height: 50px; margin-right: 5px; vertical-align: middle; padding: 0px;}





















/* Мобильная адаптация */
@media (max-width: 600px) {
    .search-bar input[type="text"] {font-size: 16px;}
    .search-bar{padding: 20px;min-width: 100%;}
    .search-input-wrapper{max-width: 50%;}
    #clearSearch{display: none;}

    .monster-section-top h2{max-width: 80%;}

    .card {flex: 1 1 100%;max-width: 100%;}
    .hidePinnedlabel{display: none;}
    .card::before {display: none;}
    .header-container{flex-direction: column;}
    .head-left{flex-direction: column;}
    .head-left{margin-top: 10px;}    


    .monster-detail-layout {
        flex-direction: column;
        padding: 15px 5px;
    }
    .results{padding: 5px;}
    .monster-info-left
     {
        flex: 1 1 100%;
        min-width: unset;
        padding: 0;
        margin-top: -45px;
    }
    .monster-drop-right{margin-top: 10px;padding: 0 5px;}
    .monster-header {
        display: flex;
        align-items: center;
        height: auto;
        justify-content: end;
    }

    .monster-header img {
        width: 50px;
        margin-right: 10px;
    }

    .monster-details {
        padding: 15px;
        border-radius: 6px;
    }

    .more-btn {
        width: 100%;
        margin-top: 30px;
    }

    .drop-item {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
    }

    .img {
        width: 50px;
        height: 50px;
    }

    .drop-info {
        
        margin-top: 5px;
    }
    .simple-drop-list{width: 100%;}
    .main-hub{width: 100%;}

}

@media (max-width: 480px) {
    .monster-header img {
        width: 40px;
    }

    .monster-header h2 {
        font-size: 1.1rem;
    }

    .more-btn {
        font-size: 0.85rem;
        padding: 8px;
    }
}
