html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #667eea;
}
html {
    scroll-behavior: smooth;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Предотвращение мерцания при загрузке */
app {
    display: contents;
}

* {
    box-sizing: border-box;
}

/* Profile Page Styles */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* Background styling */
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #667eea;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

    .profile-container::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        pointer-events: none;
        z-index: 1;
    }

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideDown 0.6s ease-out;
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 1.5rem;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.6s ease-out;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.profile-bio {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out 0.2s both;
    position: relative;
    z-index: 2;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

    .link-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        background: #f8f9ff;
        color: #667eea;
    }

    .link-button:active {
        transform: translateY(0);
    }

    .link-button i {
        font-size: 1.25rem;
        width: 1.25rem;
        text-align: center;
    }

    .link-button span {
        flex: 1;
        text-align: left;
    }

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .profile-container {
        padding: 1rem;
        background-attachment: scroll;
        background-size: cover;
    }

        .profile-container::before {
            position: absolute;
        }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-bio {
        font-size: 0.95rem;
    }

    .link-button {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .links-container {
        max-width: 100%;
    }
}

/* Games Page Styles */
.games-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    z-index: 2;
}

    .games-header h1 {
        margin: 0;
        font-size: 2.5rem;
    }

.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .back-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.game-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .game-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    }

    .game-card h2 {
        margin: 0 0 1rem 0;
        color: #667eea;
    }

    .game-card p {
        color: #666;
        margin: 0 0 1.5rem 0;
    }

.play-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .play-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    }

    .play-button:active {
        transform: translateY(0);
    }

/* Game Wrapper */
.game-wrapper {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

    .game-header h2 {
        margin: 0;
        color: #667eea;
        flex: 1;
        min-width: 150px;
    }

.game-stats {
    display: flex;
    gap: 1rem;
    flex: 1;
    justify-content: center;
    color: #666;
}

.reset-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .reset-button:hover {
        background: #ff5252;
        transform: translateY(-2px);
    }

/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.card {
    min-width: 60px;
    min-height: 60px;
    aspect-ratio: 1;
    border: 2px solid #ccc;
    background-color: #f0f0f0;
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    padding: 0;
}

    .card:hover:not(:disabled) {
        background-color: #e0e0e0;
        border-color: #999;
    }

    .card:active:not(:disabled) {
        transform: scale(0.95);
    }

    /* КАРТОЧКА ПЕРЕВЁРНУТА */
    .card.flipped {
        background-color: #ffffff;
        border-color: #007bff;
        transform: scaleX(1);
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
    }

    /* КАРТОЧКА НАЙДЕНА */
    .card.matched {
        background-color: #d4edda;
        border-color: #28a745;
        cursor: default;
        opacity: 0.9;
    }

        .card.matched:hover {
            background-color: #d4edda;
            border-color: #28a745;
        }

    /* КАРТОЧКА ВЫКЛЮЧЕНА */
    .card:disabled {
        opacity: 1;
    }

        .card:disabled.flipped {
            cursor: pointer;
        }

    /* СПАН СО ЗНАЧКОМ */
    .card span {
        display: block;
        line-height: 1;
    }

/* Tic Tac Toe */
.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.tictactoe-cell {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

    .tictactoe-cell:hover:not(:disabled) {
        background: #f8f9ff;
        transform: scale(1.05);
    }

    .tictactoe-cell:disabled {
        cursor: default;
    }

    .tictactoe-cell .x {
        color: #667eea;
    }

    .tictactoe-cell .o {
        color: #764ba2;
    }

/* Snake Game */
.snake-container {
    outline: none;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.snake-board {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 1px;
    background: #333;
    padding: 1rem;
    border-radius: 8px;
    width: 400px;
    height: 400px;
}

.snake-cell {
    background: #f0f0f0;
    border-radius: 2px;
}

    .snake-cell.head {
        background: #667eea;
    }

    .snake-cell.body {
        background: #764ba2;
    }

    .snake-cell.food {
        background: #ff6b6b;
        border-radius: 50%;
    }

/*
.game-over {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
}
*/

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    z-index: 10;
    /* плавное появление */
    opacity: 0;
    animation: fadeIn 0.2s ease forwards;
}

    .game-over h3 {
        margin: 0 0 1rem 0;
        color: #667eea;
        font-size: 2rem;
    }

    .game-over p {
        color: #666;
        margin: 0 0 2rem 0;
    }

/* Game Setup Screen */
.game-setup {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 2rem auto;
}

    .game-setup h3 {
        margin: 0 0 2rem 0;
        color: #667eea;
        font-size: 1.5rem;
    }

.game-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.option-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

    .option-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    }

    .option-button:active {
        transform: translateY(0);
    }

/* Snake Game Controls */
.snake-controls {
    display: none;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.control-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.control-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

    .control-btn:hover:not(:disabled) {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .control-btn:active:not(:disabled) {
        transform: scale(0.95);
    }

.up-btn, .down-btn {
    width: 100%;
}

/* Minesweeper Board */
.minesweeper-board {
    display: grid;
    gap: 2px;
    background: #999;
    padding: 8px;
    border-radius: 8px;
    margin: 2rem auto;
    width: fit-content;
}

.minesweeper-cell {
    width: 40px;
    height: 40px;
    background: #c0c0c0;
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000080;
    transition: all 0.1s ease;
    user-select: none;
}

    .minesweeper-cell:hover:not(:disabled) {
        background: #e0e0e0;
    }

    .minesweeper-cell:active:not(:disabled) {
        border-style: inset;
        border-right-color: #dfdfdf;
        border-bottom-color: #dfdfdf;
        border-left-color: #808080;
        border-top-color: #808080;
    }

    .minesweeper-cell.revealed {
        background: #c0c0c0;
        border-style: solid;
        border: 1px solid #999;
        cursor: default;
    }

    .minesweeper-cell.flagged {
        background: #c0c0c0;
        border: 1px solid #999;
    }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.5rem;
    }

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.modal-body {
    padding: 2rem;
}

@media (max-width: 640px) {
    .games-header {
        flex-direction: column;
        gap: 1rem;
    }

        .games-header h1 {
            font-size: 1.8rem;
        }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .memory-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .snake-board {
        width: 300px;
        height: 300px;
        grid-template-columns: repeat(20, 1fr);
    }

    .snake-controls {
        display: flex;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .up-btn, .down-btn {
        width: 100%;
    }

    .minesweeper-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .game-header {
        flex-direction: column;
    }

    .game-stats {
        flex-direction: column;
    }

    .game-wrapper {
        max-width: 100%;
        padding: 1rem;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 8px;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* Friends Page Styles */
.friends-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    z-index: 2;
}

    .friends-header h1 {
        margin: 0;
        font-size: 2.5rem;
    }

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.friend-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

    .friend-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
        border-color: #667eea;
    }

.friend-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #667eea;
    object-fit: cover;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.friend-name {
    margin: 0;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.no-friends {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #666;
    position: relative;
    z-index: 2;
}

.friend-back {
    position: absolute;
    right: 2rem;
    top: 2rem;
    margin: 0;
    z-index: 10;
}

.profile-header {
    text-align: center;
}

@media (max-width: 640px) {
    .friends-container {
        padding: 1rem;
    }

    .friends-header {
        flex-direction: column;
        gap: 1rem;
    }

        .friends-header h1 {
            font-size: 1.8rem;
        }

    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
        margin-top: 3rem;
    }

    .friend-card {
        padding: 1rem;
    }

    .friend-avatar {
        width: 80px;
        height: 80px;
    }

    .friend-name {
        font-size: 0.9rem;
    }
}

/* Стили для спиннера */
.spinner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3498db;
    border-right: 4px solid #e74c3c;
    border-bottom: 4px solid #f39c12;
    border-left: 4px solid #2ecc71;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #666;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .spinner {
        width: 50px;
        height: 50px;
    }
}

/* ===== ARTICLE STYLES ===== */
.article-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.article-title {
    font-size: 42px;
    color: #1a1a1a;
    margin: 20px 0 0 0;
    line-height: 1.2;
    font-weight: 700;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

    .article-content h1 {
        font-size: 36px;
        color: #1a1a1a;
        margin: 40px 0 20px 0;
        font-weight: 700;
    }

    .article-content h2 {
        font-size: 28px;
        color: #2c3e50;
        margin: 35px 0 20px 0;
        border-bottom: 3px solid #667eea;
        padding-bottom: 10px;
        font-weight: 600;
    }

    .article-content h3 {
        font-size: 22px;
        color: #34495e;
        margin: 30px 0 15px 0;
        font-weight: 600;
    }

    .article-content p {
        margin: 18px 0;
        text-align: justify;
    }

    .article-content ul,
    .article-content ol {
        margin: 20px 0;
        padding-left: 30px;
        color: #333;
    }

    .article-content li {
        margin: 10px 0;
        line-height: 1.6;
    }

    .article-content code {
        background-color: #f5f5f5;
        padding: 3px 8px;
        border-radius: 4px;
        font-family: 'Courier New', monospace;
        color: #d63384;
        font-size: 14px;
        border: 1px solid #e0e0e0;
    }

    .article-content pre {
        background-color: #2c3e50;
        color: #ecf0f1;
        padding: 20px;
        border-radius: 8px;
        overflow-x: auto;
        margin: 20px 0;
        border-left: 4px solid #667eea;
    }

        .article-content pre code {
            color: inherit;
            padding: 0;
            background-color: transparent;
            border: none;
            font-size: 14px;
        }

    .article-content blockquote {
        border-left: 4px solid #667eea;
        padding: 15px 0 15px 20px;
        margin: 20px 0;
        color: #555;
        font-style: italic;
        background-color: #f9f9f9;
        border-radius: 0 8px 8px 0;
    }

    .article-content a {
        color: #667eea;
        text-decoration: none;
        border-bottom: 2px solid transparent;
        transition: all 0.3s;
        font-weight: 500;
    }

        .article-content a:hover {
            border-bottom-color: #667eea;
            color: #764ba2;
        }

    .article-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 25px auto;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid #e0e0e0;
    }

    .article-content strong {
        font-weight: 700;
        color: #1a1a1a;
    }

    .article-content em {
        font-style: italic;
        color: #555;
    }

    .article-content hr {
        border: none;
        border-top: 2px solid #ddd;
        margin: 30px 0;
        opacity: 0.8;
    }

.article-back-button {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: color 0.3s, transform 0.3s;
}

    .article-back-button:hover {
        color: #764ba2;
        transform: translateX(-5px);
    }

.articles-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

    .articles-header h1 {
        font-size: 2.5rem;
        margin: 0;
    }

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-link-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .article-link-button:hover {
        background-color: #e0e0e0;
        border-color: #999;
        transform: translateX(5px);
    }

.article-title-text {
    flex-grow: 1;
}

.article-arrow {
    font-size: 1.5rem;
    margin-left: 10px;
}

.no-articles {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

@media (max-width: 480px) {
        .article-wrapper {
            padding: 20px 15px;
            border-radius: 8px;
        }

        .article-container {
            padding: 15px 8px;
        }

        .article-title {
            font-size: 24px;
        }

        .article-header {
            margin-bottom: 25px;
        }

        .article-content h2 {
            font-size: 20px;
            margin: 25px 0 15px 0;
        }

        .article-content h1 {
            font-size: 22px;
        }

        .article-content {
            font-size: 14px;
            line-height: 1.6;
        }

            .article-content img {
                margin: 15px auto;
            }

        .error-content {
            padding: 40px 20px;
        }
    
        .error-code {
            font-size: 80px;
        }
    
        .error-title {
            font-size: 24px;
        }
    }

/* ===== ERROR STYLES ===== */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.error-content {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: 36px;
    color: #333;
    margin: 0 0 15px 0;
}

.error-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.error-request-id {
    font-size: 12px;
    color: #999;
    margin: 20px 0 0 0;
    word-break: break-all;
}

.error-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: 20px;
}

    .error-button:hover {
        background: #764ba2;
    }

@media (max-width: 480px) {
    .error-content {
        padding: 40px 20px;
    }
    
    .error-code {
        font-size: 80px;
    }
    
    .error-title {
        font-size: 24px;
    }
}