@font-face {
    font-family: 'Oddval';
    src: url('fonts/Oddval-SemiBold.woff2') format('woff2'),
         url('fonts/Oddval-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #111111;
    --text-color: #ffffff;
    --accent-color: #ffe6a7;
    --border-radius: 4px;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}
a:hover { text-decoration: underline; }
a:visited { color: var(--accent-color); }

.text-bold { font-weight: 600; }
.text-italic { font-style: italic; }
.text-attention { color: var(--accent-color); }
.text-normal { font-weight: normal; font-style: normal; color: var(--text-color); }

.project-team-logo {
    height: 80px;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* === Header (общий) === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background-color: var(--bg-color);
    border-bottom: 1px solid #333;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* === Main — для index.html (карточки) === */
main {
    flex: 1;
    margin-top: 60px;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.main-title {
    font-family: 'Oddval', sans-serif;
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.2;
    color: #ffffff;
    text-align: left;
    margin-top: 60px;
}

.rules-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.rule-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rule-card {
    position: relative;
    height: 400px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--accent-color);
}

.card-date {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
}

.card-content {
    position: absolute;
    top: 200px;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.2rem;
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin-top: 40px;
    z-index: 2;
    box-sizing: border-box;
}

.card-title {
    font-family: 'Oddval', sans-serif;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.card-description {
    font-size: 14px;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.card-amount {
    margin-top: 0.5rem;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* === Main — для article.html (статья) === */
main.article-page {
    flex: 1;
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    padding-top: 60px;
    margin-bottom: 50px;
}

@media (min-width: 1025px) {
    main.article-page {
        margin-left: 100px;
        margin-right: 45vw;
    }
}

.rule-article {
    margin-bottom: 3.0rem;
}

.rule-title {
    font-family: 'Oddval', sans-serif;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 1.2rem;
}

.rule-description {
    margin-bottom: 1.5rem;
}

.rule-description p {
    margin: 0.8rem 0;
    font-size: 16px;
}

.rule-description p.list-item {
    padding-left: 1.8rem;
    text-indent: -1.2rem;
}

.rule-description .sub-item {
    margin-top: 0.4rem;
    padding-left: 1.4rem;
    text-indent: -0.8rem;
    font-size: 16px;
    line-height: 1.6;
    display: block;
}
.rule-description .sub-item:first-of-type {
    margin-top: 0.8rem;
}

.punishments {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.punishment-btn {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid var(--accent-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.discord-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.discord-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* === Footer (общий) === */
footer {
    background-color: #0a0a0a;
    color: var(--text-color);
    text-align: center;
    padding: 2rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-team {
    font-family: 'Oddval', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: text-decoration 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
    font-family: 'Inter', sans-serif;
}

/* === Мобильные стили === */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
    }
    main {
        padding: 0 1rem 3rem;
    }
    main.article-page {
        margin: 2.5rem auto !important;
        padding: 0 1rem;
        padding-top: 80px;
    }
    .main-title,
    .rule-title {
        font-size: 2.2rem;
    }
    .rule-title {
        font-size: 1.6rem;
    }
    .rules-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .rule-description p.list-item {
        padding-left: 1.5rem;
        text-indent: -1rem;
    }
    .rule-description .sub-item {
        padding-left: 1.3rem;
        text-indent: -0.7rem;
    }
}

@media (max-width: 1024px) {
    .main-title,
    .rule-title {
        text-align: center;
    }
    .rule-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 1.5rem;
    }
    main {
        padding: 0 1.5rem 3rem;
        margin-top: 80px;
    }
    main.article-page {
        margin: 2.5rem auto !important;
        padding: 0 1.5rem;
        padding-top: 80px;
        max-width: 700px;
    }
    .punishments {
        justify-content: center;
    }
}