/* ============ RESET ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f4f6f9;
    color: #333;
}

/* ============ NAVBAR ============ */
.navbar {
    background-color: #0d3b66;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar ul.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin: 0 10px;
}

.navbar a {
    display: inline-block;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #125399;
}

/* ============ LOGOUT (USER BLOCK) ============ */
.user-block {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-form {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.logout-icon {
    all: unset;
    color: white;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    line-height: 1;
    transition: color 0.3s;
}

.logout-icon:hover {
    color: #f0ad4e;
}

/* ============ MAIN CONTENT ============ */
main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ============ SECTION TITLE ============ */
h2 {
    font-size: 22px;
    margin-bottom: 15px;
    border-left: 5px solid #003366;
    padding-left: 10px;
    color: #003366;
}

/* ============ ARTICLE CARDS ============ */
.article {
    background-color: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.article:hover {
    transform: scale(1.01);
}

.article a {
    color: #003366;
    font-weight: bold;
    text-decoration: none;
}

.article a:hover {
    text-decoration: underline;
}

.article .timestamp {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

/* ============ POST PREVIEW ============ */
.post-preview ul {
    list-style: none;
    padding-left: 0;
}

.post-preview li {
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.post-preview li a {
    font-size: 17px;
    color: #003366;
    font-weight: bold;
    text-decoration: none;
}

.post-preview li a:hover {
    text-decoration: underline;
}

.post-preview li small {
    font-size: 13px;
    color: #888;
}

.post-preview li p {
    margin-top: 5px;
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

/* ============ FORMS ============ */
form:not(.logout-form) {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="submit"],
form button {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

form button,
form input[type="submit"] {
    background-color: #003366;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

form button:hover,
form input[type="submit"]:hover {
    background-color: #0052a3;
}

/* ============ DJANGO MESSAGES ============ */
.messages {
    list-style: none;
    margin: 1em auto;
    padding: 0;
    max-width: 600px;
}

.messages li {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.messages li.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 6px solid #28a745;
}

.messages li.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 6px solid #dc3545;
}

.messages li.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 6px solid #ffc107;
}

.messages li.info {
    background-color: #cce5ff;
    color: #004085;
    border-left: 6px solid #17a2b8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .navbar ul.menu {
        flex-direction: row;
        justify-content: space-around;
        padding: 5px 0;
    }

    .navbar li {
        padding: 0;
        margin: 0 2px;
    }

    .navbar a,
    .logout-form button.logout-link {
        font-size: 13px;
        padding: 6px 0;
    }

    main {
        padding: 0 15px;
    }

    h2 {
        font-size: 20px;
    }
}

/* ====== CUSTOM PROFILE BUTTONS ====== */
.link-inventory {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 20px;
    background-color: #e83e8c;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.link-inventory:hover {
    background-color: #c62874;
}

.btn-equip-action {
    padding: 4px 8px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    background-color: #0d3b66;
    color: white;
    margin-top: 8px;
    cursor: pointer;
}

.btn-equip-action:hover {
    background-color: #125399;
}
