MediaWiki:Test.css: различия между версиями

Страница интерфейса MediaWiki
Нет описания правки
Метка: отменено
Нет описания правки
Метка: отменено
Строка 1: Строка 1:
:root {
/* ==================== Сетка карточек ==================== */
    --transition-duration: 0.4s;
.recipes-grid {
    --primary-bg-color: #0a0e17;
  display: flex;
    --secondary-bg-color: #131a2a;
  flex-wrap: wrap;
    --item-bg-color: #1a243b;
  gap: var(--card-gap);
    --item-hover-bg-color: #243156;
  margin: 8px 0;
    --border-color: #2a3a5a;
  justify-content: flex-start;
    --text-color: #d4dcf0;
  padding-left: var(--content-left);
    --hover-text-color: #ffffff;
  padding-right: var(--content-right);
    --accent-color: #4a7ce7;
  box-sizing: border-box;
    --accent-hover: #5b8df8;
    --font-family: 'Arial', sans-serif;
    --menu-border-radius: 15px;
    --header-padding: 25px;
    --item-height: 160px;
    --icon-size: 64px;
    --text-font-size: 16px;
}
}


body {
.recipe-card {
    background: linear-gradient(135deg, #0c1220 0%, #1a243b 100%);
  background: #1a1a1a;
    margin: 0;
  border: 1px solid #444;
    padding: 20px;
  border-radius: 8px;
    font-family: var(--font-family);
  padding: 8px 10px;
    color: var(--text-color);
  flex: 1 1 calc((100% - 3 * var(--card-gap)) / 4);
    min-height: 100vh;
  min-width: 220px;
  max-width: 1fr;
  box-sizing: border-box;
  color: #ddd;
  font-size: 13px;
  line-height: 1.3em;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
}


.stars-bg {
.recipe-card:hover {
    position: fixed;
  border-color: #7CFC00;
    top: 0;
  box-shadow: 0 0 10px rgba(124,252,0,0.6);
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 5px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 4px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    z-index: -1;
}
}


.custom-lore-menu {
.element-title {
    max-width: 1200px;
  display: block;
    margin: 30px auto;
  text-align: center;
    padding: 30px;
  font-weight: bold;
    border-radius: var(--menu-border-radius);
  color: #7CFC00;
    background: rgba(10, 14, 23, 0.85);
  font-size: 14px;
    display: grid;
  margin-bottom: 6px;
    grid-template-columns: 1fr;
    gap: 25px;
    font-family: var(--font-family);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
}


.custom-lore-menu::before {
.element-description {
    content: '';
  font-size: 12px;
    position: absolute;
  color: #bbb;
    top: 0;
  text-align: center;
    left: 0;
  margin-bottom: 6px;
    right: 0;
  font-style: italic;
    height: 5px;
    background: linear-gradient(90deg, #4a7ce7, #8a5ce7, #4a7ce7);
    border-radius: 5px 5px 0 0;
}
}


.custom-header {
.recipe-line b {
    text-align: center;
  display: block;
    background: linear-gradient(90deg, rgba(26, 36, 59, 0.7) 0%, rgba(42, 58, 90, 0.7) 100%);
  margin-bottom: 4px;
    padding: var(--header-padding);
  color: #ffcc00;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(90, 150, 255, 0.5);
    letter-spacing: 1px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}
}


.custom-header::before {
.recipe-line {
    content: '';
  display: flex;
    position: absolute;
  flex-wrap: wrap; /* разрешаем перенос внутри карточки, чтобы рецепт не вылезал */
    top: 0;
  gap: 4px;
    left: -100%;
  margin-bottom: 6px;
    width: 100%;
  word-break: break-word; /* длинные слова будут переноситься */
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 5s infinite;
}
}


@keyframes shimmer {
/* ==================== Ингредиенты ==================== */
    0% { left: -100%; }
.ingredient {
    20% { left: 100%; }
  background: #333;
    100% { left: 100%; }
  color: #ffcc00;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: bold;
  display: inline-block;
  flex-shrink: 0; /* не уменьшаем сильно */
}
}


.custom-links {
.ingredient.product {
    display: grid;
  background: #7CFC00;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  color: #222;
    gap: 20px;
    padding: 20px;
    justify-items: center;
    align-items: stretch;
}
}


.custom-item {
.arrow {
    display: flex;
  font-weight: bold;
    flex-direction: column;
  color: #ccc;
    align-items: center;
  flex-shrink: 0;
    justify-content: center;
    width: 100%;
    height: var(--item-height);
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--item-bg-color), #161f33);
    transition: all var(--transition-duration);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}
}


.custom-item::before {
/* ==================== Мобильная версия ==================== */
    content: '';
@media (max-width: 600px) {
     position: absolute;
  .recipe-card {
     top: 0;
     flex: 1 1 100%;
    left: 0;
     min-width: 0;
    right: 0;
  }
    height: 3px;
    background: var(--accent-color);
    opacity: 0.7;
}
}


.custom-item:hover {
/* ==================== Широкие экраны ≥1120px ==================== */
    background: linear-gradient(145deg, var(--item-hover-bg-color), #1c2742);
@media screen and (min-width: 1120px) {
    transform: translateY(-5px) scale(1.03);
  .recipe-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
     flex: 1 1 calc((100% - 3 * var(--card-gap)) / 4); /* 4 карточки в ряд */
    border-color: var(--accent-color);
  }
}
 
.custom-item:hover::before {
     background: var(--accent-hover);
    opacity: 1;
}
 
.custom-item a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: color var(--transition-duration), text-shadow var(--transition-duration);
    font-size: var(--text-font-size);
    font-weight: bold;
    z-index: 2;
    padding: 10px;
}
 
.custom-item a:hover {
    color: var(--hover-text-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}
 
.custom-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    margin-bottom: 10px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(90, 150, 255, 0.5));
    transition: transform var(--transition-duration);
}
 
.custom-item:hover .custom-icon {
    transform: scale(1.1) rotate(5deg);
}
 
.corporate-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}
 
.corporate-logo {
    opacity: 0.7;
    transition: opacity 0.3s;
    filter: grayscale(0.3);
}
 
.corporate-logo:hover {
    opacity: 1;
    filter: grayscale(0);
}
 
@media (max-width: 768px) {
    .custom-lore-menu { padding: 20px; }
    .custom-links { grid-template-columns: repeat(2, 1fr); }
    .custom-item { height: auto; padding: 15px 10px; }
    .custom-item a { font-size: 14px; }
    .corporate-logos { gap: 15px; }
    .corporate-logo img { width: 80px; }
}
 
@media (max-width: 480px) {
    .custom-links { grid-template-columns: 1fr; }
    .custom-header { font-size: 22px; padding: 15px; }
}
}

Версия от 16:55, 2 октября 2025

/* ==================== Сетка карточек ==================== */
.recipes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--card-gap);
  margin: 8px 0;
  justify-content: flex-start;
  padding-left: var(--content-left);
  padding-right: var(--content-right);
  box-sizing: border-box;
}

.recipe-card {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 10px;
  flex: 1 1 calc((100% - 3 * var(--card-gap)) / 4);
  min-width: 220px;
  max-width: 1fr;
  box-sizing: border-box;
  color: #ddd;
  font-size: 13px;
  line-height: 1.3em;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.recipe-card:hover {
  border-color: #7CFC00;
  box-shadow: 0 0 10px rgba(124,252,0,0.6);
}

.element-title {
  display: block;
  text-align: center;
  font-weight: bold;
  color: #7CFC00;
  font-size: 14px;
  margin-bottom: 6px;
}

.element-description {
  font-size: 12px;
  color: #bbb;
  text-align: center;
  margin-bottom: 6px;
  font-style: italic;
}

.recipe-line b {
  display: block;
  margin-bottom: 4px;
  color: #ffcc00;
}

.recipe-line {
  display: flex;
  flex-wrap: wrap; /* разрешаем перенос внутри карточки, чтобы рецепт не вылезал */
  gap: 4px;
  margin-bottom: 6px;
  word-break: break-word; /* длинные слова будут переноситься */
}

/* ==================== Ингредиенты ==================== */
.ingredient {
  background: #333;
  color: #ffcc00;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: bold;
  display: inline-block;
  flex-shrink: 0; /* не уменьшаем сильно */
}

.ingredient.product {
  background: #7CFC00;
  color: #222;
}

.arrow {
  font-weight: bold;
  color: #ccc;
  flex-shrink: 0;
}

/* ==================== Мобильная версия ==================== */
@media (max-width: 600px) {
  .recipe-card {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* ==================== Широкие экраны ≥1120px ==================== */
@media screen and (min-width: 1120px) {
  .recipe-card {
    flex: 1 1 calc((100% - 3 * var(--card-gap)) / 4); /* 4 карточки в ряд */
  }
}