/*Programmer: Bryan Jay M. Lumabas*/
:root {
    --primary: #333333;
    --secondary: #232323;
    --danger: #121212;
    --bg: #222325;
    --text: #F2F2F2;
    --container-width: 800px;
}

body { 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    margin: 0;
    padding: 0;
    min-height: 10vh;
    display: flex;
    flex-direction: column;
}

.container { 
    width: 80%;
    max-width: var(--container-width); 
    margin: 250px auto; 
    background: var(--primary); 
    padding: clamp(15px, 5vw, 30px);
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.profile-card { 
    text-align: center; 
    border-bottom: 2px solid var(--danger); 
    padding-bottom: 20px; 
    margin-bottom: 20px; 
}

.image-container { 
    position: relative; 
    width: clamp(100px, 50vw, 150px);
    height: clamp(100px, 50vw, 150px); 
    margin: 0 auto; 
    cursor: pointer; 
    border-radius: 50%;
    border: 4px solid var(--bg);
    overflow: hidden;
}

#profile-pic { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

.overlay { 
    position: absolute; 
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: rgba(0,0,0,0.4); 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--danger); 
    opacity: 0; 
    transition: 0.3s ease; 
}

.image-container:hover .overlay { opacity: 1; }

.grid-container { 
    display: grid; 
    grid-template-columns: 1fr;
    gap: 20px; 
}

@media (min-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
    .full-width { 
        grid-column: span 2; 
    }
}

.list-section { 
    border: 2px solid var(--danger); 
    padding: 20px; 
    border-radius: 8px; 
}

ul { list-style: none; padding: 0; margin: 10px 0; }

li { 
    background: var(--bg); 
    border: 2px solid var(--danger); 
    margin: 10px 0; 
    padding: clamp(10px, 2vw, 15px); 
    border-radius: 6px; 
    cursor: move; 
    transition: 0.2s; 
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

li:hover { background-color: var(--secondary); border-color: var(--danger); }
li.selected { background-color: var(--danger) !important; border-color: var(--text); }
li.dragging { opacity: 0.5; }

.editable-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    position: relative;
}

.edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.edit-btn:hover {
    background-color: var(--secondary);
    transform: scale(1.05);
}

.inline-edit-input {
    background: var(--bg);
    border: 2px solid var(--danger);
    color: var(--text);
    padding: 10px;
    border-radius: 6px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-family: inherit;
    width: 100%;
    max-width: calc(var(--container-width) - 200px);
    box-sizing: border-box;
}

.global-actions { 
    margin-top: 30px; 
    display: flex; 
    flex-wrap: wrap;
    gap: 20px; 
    justify-content: center; 
}

.global-btn { 
    padding: 15px 39px; 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: bold; 
    flex-grow: 1;
    max-width: 200px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.save { 
    background: #3498DB; 
    color: var(--text); 
}

.save:hover { 
    background-color: #1D5980; 
    transform: scale(1.05);
}

.reset { 
    background: #95a5a6; 
    color: var(--text); 
}

.reset:hover { 
    background-color: #4DB6AC; 
    transform: scale(1.05);
}

*:focus {
    outline: none !important;
}

.inline-edit-input:focus {
    border-color: var(--text);
    box-shadow: 0 0 5px rgba(242, 242, 242, 0.2);
}

.inline-edit-input {
    caret-color: var(--text);
}

li:focus {
    outline: none;
}
