:root {
    /* --accent-color: #8CC924; */
    --accent-color: #9CC43C;
}

/* --- Reset & Global --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f4f4f4, #e9e9e9);
    color: #333;
    line-height: 1.5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Container global --- */
.container, .login-container, .profile-card, .delegation-card, .article, .article-comments {
    max-width: 900px;
    width: 100%;
    margin: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-out;
}

/* --- Titles --- */
h1, h2, h3 {
    text-align: center;
    color: #222;
    margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

/* --- Buttons --- */
button, .back-btn, .add-btn, .submit-btn, .manage-btn, .logout {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 0.6rem;
    text-align: center;
    transition: background 0.2s ease-in-out;
    max-width: 350px;
    margin: 0 auto;
}

button:hover, .back-btn:hover, .add-btn:hover, .submit-btn:hover, .manage-btn:hover, .logout:hover {
    /* background: #6fa21b; */
    background: #92b343;
}
button:hover, #appleid-signin {
    cursor: pointer;
}
.delete-btn, .delete-host-btn {
    background: #dc3545;
}

.delete-btn:hover, .delete-host-btn:hover {
    background: #a71d2a;
}

/* --- Texts --- */
.title {
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #222;
    text-align: center;
}

.date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1rem;
    text-align: center;
}

.content, .comment_content {
    color: #444;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-top: 1rem;
    text-align: justify;
}

/* --- Authors & Avatars --- */
.article-author, .author, .comment_author, .avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.8rem;
}

.article-author img, .author img, .comment_author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

/* --- Comments --- */
.comment {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* --- Forms --- */
input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    margin-top: 0.5rem;
}

input:focus, textarea:focus {
    border-color: var(--accent-color);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
}

/* --- WebXPs list --- */
.webxps-list {
    list-style: none;
    padding: 0;
}

.webxps-list li {
    background: #f7f7f7;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webxps-list li .info {
    display: block;
    font-size: 0.85rem;
    color: #555;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
