:root {
    --primary: #2D3436;
    --secondary: #636E72;
    --accent: #00B894;
    --background: #F5F6FA;
    --card: #FFFFFF;
    --error: #FF7675;
    --success: #00CEC9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--background);
    color: var(--primary);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.navbar {
    background: var(--card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: .5rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.header {
    text-align: center;
    margin: 3rem 0;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.content {
    /* background: var(--card); */
    border-radius: 16px;
    /* padding: 2rem; */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    line-height: 1.6;
}

.content h2 {
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.content p {
    color: var(--secondary);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header h1 {
        font-size: 2rem;
    }
}

:root {
    --primary: #2D3436;
    --secondary: #636E72;
    --accent: #00B894;
    --background: #F5F6FA;
    --card: #FFFFFF;
    --error: #FF7675;
    --success: #00CEC9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    /* background: var(--background); */
    color: var(--primary);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1rem;
    align-items: start;
}

.form-section {
    background: var(--card);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: sticky;
    top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 500;
    color: var(--secondary);
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,184,148,0.1);
}

button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

button[type="submit"] {
    background: var(--accent);
    color: white;
}

button[type="submit"]:hover {
    background: #00A187;
    transform: translateY(-1px);
}

button.random {
    background: var(--background);
    color: var(--secondary);
}

button.random:hover {
    background: #E2E8F0;
}

.chart-wrapper {
    position: relative;
    background: var(--card);
    border-radius: 16px;
    padding: 2rem 2rem 0 3rem;
    min-height: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    overflow: hidden;
}

.chart-section {
    flex: 1;
    overflow-x: auto;
    overflow-y: scroll;
    display: flex;
    align-items: flex-end;
    gap: 0rem;
    position: relative;
    padding-left: 3rem;
    margin-left: -3rem;
    z-index: 2;
}

.measurement-lines {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3rem;
    background: var(--card);
    z-index: 10;
}

.measurement-line {
    position: absolute;
    left: 0;
    right: -2000px;
    height: 1px;
    background: rgba(0,0,0,0.05);
    z-index: 1;
}

.measurement-line::after {
    content: attr(data-height) 'cm';
    position: absolute;
    left: 0.5rem;
    top: -10px;
    font-size: 0.75rem;
    color: var(--secondary);
    background: var(--card);
    padding: 2px 4px;
    z-index: 2;
}

svg{
    height: fit-content;
}

.person-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 -4px;
    position: relative;
    animation: fadeIn 0.5s ease-out;
    padding-bottom: 5px; /* Space for height value */
}

.person-name {
    margin-top: 0.5rem;
    font-weight: 500;
}

.details-button {
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    background: var(--background);
    border-radius: 20px;
    width: auto;
}

.popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    margin-bottom: 10px;
}

.popover::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--card);
}

.person-container:hover .popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.popover-content {
    margin: 0.5rem 0;
    color: var(--secondary);
    font-size: 0.875rem;
}

.popover-content strong {
    color: var(--primary);
    margin-right: 0.5rem;
}

.height-line {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1px;
    background: var(--accent);
    opacity: 0.3;
}

.height-value {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--secondary);
    white-space: nowrap;
}

.people-box {
    transition: all 0.3s ease;
}

.people-box:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .form-section {
        position: relative;
        top: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .form-section, .chart-section {
        padding: 1.5rem;
    }
}

.delete-button {
    position: absolute;
    top: 0px;
    right: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    padding: 0;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.person-container:hover .delete-button {
    opacity: 1;
}

.delete-button:hover {
    transform: scale(1.1);
    background: #FF5252;
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background);
    resize: vertical;
    /* min-height: 100px; */
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,184,148,0.1);
}

button.share {
    background: var(--success);
    color: white;
    margin-top: 1rem;
}

button.share:hover {
    background: #00B5B2;
}
.content-show {
    
    margin: 30px;
}

/* .container {
    max-width: 100%;
    padding: 0;
} */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-width: 300px;
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.modal-content {
    margin-top: 10px;
}

.person-info {
    position: absolute;
    top: 0;
    right: -20px;
    padding: 5px;
    z-index: 100;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
}

.language-switcher a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
    color: var(--accent);
}

.language-switcher span {
    color: var(--secondary);
}

/* RTL Support */
html[dir="rtl"] .nav-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}