/* Elegant Minimalistic Family Tree Styles */
* {
    box-sizing: border-box;
}

body {
    overflow: hidden;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #fafafa;
    color: #363636;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1);
}

.header {
    background: #ffffff;
    color: #363636;
    height: 83px;
    padding: 0 16px;
    text-align: center;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 20px;
    font-weight: 400;
    text-align: left;
    color: #363636;
    flex: 1;
    min-width: 250px;
}

.header p {
    margin: 0;
    color: #4a4a4a;
    font-size: 1.1rem;
    font-weight: 400;
}

.controls {
    border-bottom: 1px solid #dbdbdb;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
}

.btn {
    background: transparent;
    color: #3273dc;
    border: 2px solid #3273dc;
    padding: 0.75rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.btn:hover {
    background: #3273dc;
    color: #ffffff;
    border-color: #3273dc;
}

.btn:focus {
    border-color: #3273dc;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
}

/* Material Symbols styling for stroke icons */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    font-size: 20px;
    line-height: 1;
}

.btn:active {
    background: #2366d1;
    border-color: #2366d1;
}

#myDiagramDiv {
    background: #ffffff;
    border: none;
    width: 100%;
    height: 100vh;
    position: relative;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #4a4a4a;
}

.spinner {
    border: 2px solid #dbdbdb;
    border-top: 2px solid #3273dc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 12px;
    margin: 0;
    padding: 0;
    padding-left: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 12px;
    display: flex;
    align-items: center;
    color: #363636;
}

.stat-item {
    display: inline;
    margin: 0;
    padding: 0;
}

.stat-item:not(:last-child):after {
    content: ", ";
}

.stat-number {
    font-size: 12px;
    font-weight: 400;
    color: #363636;
    display: inline;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 400;
    color: #363636;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    display: inline;
}

#hidden {
    font: 500 18px Poppins;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        height: 67px;
        padding: 0 8px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        box-sizing: border-box;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        max-width: 1400px;
        margin: 0 auto;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .header h1 {
        font-size: 16px;
        margin: 0;
        flex: 1;
        min-width: auto;
    }
    
    .controls {
        justify-content: center;
    }
    
    .btn {
        padding: 0.5rem;
        margin: 0.125rem;
        font-size: 0.75rem;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    #myDiagramDiv {
        height: 100vh;
    }
    
    .stats {
        padding-left: 8px;
    }
    
    .stat-item {
        margin: 0;
        padding: 0;
    }
    
    .stat-number {
        font-size: 12px;
    }
}
