
* {
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: #222;
    color: white;
    margin: 0;
    padding: 0;
}
.header {
    text-align: center;
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    background-color: #222;
    z-index: 10;
    padding: 30px 20px 20px;
}
.header h1 {
    color: red;
    margin-bottom: 5px;
}
.header p {
    margin-top: 0;
    color: #ccc;
}
main{
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.hero,
.skills,
.projects,
.contact {
    background-color: #333;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.button {
    display: inline-block;
    background-color: red;
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 10px;
    transition: 0.2s;
}
.button:hover {
    background-color: #cc0000;
    transform: translateY(-3px);
}
.skill-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.skill-list span {
    background-color: #444;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
}
footer {
    text-align: center;
    margin-top: 40px;
    color: #ccc;
}
.project-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #444;
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.project-card .button {
    margin-top: auto;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}
.project-card h3 {
    margin-top: 0;
}
.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
nav a {
    color: #ccc;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}
nav a:hover {
    color: red;
}
html {
    scroll-behavior: smooth;
}
.contact-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.todo {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}
#todo-input {
    padding: 10px;
    width: 70%;
}
#add-btn {
    padding: 10px;
    background: red;
    color: white;
    border: none;
    cursor: pointer;
}
li {
    margin-top: 10px;
    background: #444;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}
#clear-btn {
    padding: 10px;
    background: red;
    color: white;
    border: none;
    cursor: pointer;

}
.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.filter-buttons button {
    background-color: #444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.filter-buttons button:hover {
    background-color: red;
}
.filter-buttons button.active {
    background-color: red;
}
.todo-actions {
    display: flex;
    gap: 8px;
}
.todo li span {
    flex: 1;
}
.todo li input {
    flex: 1;
    padding: 8px;
}
.light-theme {
    background-color: #f5f5f5;
    color: black;
}

.light-theme .hero,
.light-theme .skills,
.light-theme .projects,
.light-theme .contact,
.light-theme .todo,
.light-theme .users,
.light-theme .project-card{
    background-color: #f1f1f1;
    color: black;
    border: 1px solid #ccc;
}
.light-theme .theme-btn{
    background-color: #575555;
    color: white;
    border: 1px solid #575555;
}
.light-theme input {
    background-color: white;
    color: black;
}
.light-theme .header {
    background-color: #222;
    color: white;
}

.theme-btn {
    position: fixed;
    top: 24px;
    right: 24px;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;

    font-size: 18px;
    cursor: pointer;

    background-color: #333;
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transition: 0.3s;
    z-index: 100;
}
.theme-btn:hover {
    transform: scale(1.08);
}
.users {
    background-color: #333;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
#load-users-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
#loading-text {
    display: none;
}
#error-text {
    color: red;
}
.user-card {
    position: relative;
    background-color: #444;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}
.light-theme .user-card {
    background-color: #ccc;
}
.api-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
#search-user {
    padding: 10px 20px;
    width: 250px;
}
.add-user-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}
#add-user-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
#name-input,
#email-input {
    border: none;
    padding: 8px 12px;
}
.delete-user-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;

    background-color: red;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.delete-user-btn:hover {
    background-color: darkred;
}
.edit-user-btn {
    position: absolute;
    bottom: 15px;
    right: 70px;

    background-color: #555;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.edit-user-btn:hover {
    background-color: #666;
}
.edit-name-input,
.edit-email-input {
    display: block;
    width: 70%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
}
.save-user-btn {
    position: absolute;
    bottom: 15px;
    right: 70px;

    background-color: #555;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.save-user-btn:hover {
    background-color: #666;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    .hero,
    .skills,
    .projects,
    .contact,
    .todo,
    .users {
        padding: 20px;
    }
    .skill-list,
    .contact-links,
    .api-controls,
    .add-user-form {
        flex-direction: column;
        align-items: stretch;
    }
    .project-list {
        grid-template-columns: 1fr;
    }
    #todo-input,
    #add-btn,
    #clear-btn,
    #search-user,
    #load-users-btn,
    #name-input,
    #emai-input,
    #add-user-btn {
        width: 100%;
    }
    .todo input,
    .todo button {
        margin-bottom: 8px;
    }

    .edit-name-input,
    .edit-email-input {
        width: 100%;
    }
    .theme-btn {
        width: 38px;
        height: 38px;
        top: 15px;
        right: 15px;
    }
}