* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* font-smoothing: antialiased; */
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    -webkit-font-smoothing: subpixel-antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    backface-visibility: hidden; /* Helps with rendering performance */
}

.btn {
    padding: 10px 15px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
    transform: translateZ(0); /* Force hardware acceleration */
}

.btn:hover {
    background: #3367d6;
}

.card {
    background: white;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin-bottom: 20px;
    transform: translateZ(0); /* Improves rendering */
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

.statistics {
    margin-top: 40px;
}

.graph-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50%, 2fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .graph-container {
        grid-template-columns: 1fr;
    }
}

.graph-card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    backface-visibility: hidden;
}

.graph {
    height: 300px;
    width: 100%;
    flex-grow: 1;
    min-height: 0;
    shape-rendering: crispEdges; /* For SVG elements */
}

.error-message {
    color: #d93025;
    margin-bottom: 15px;
    display: none;
    text-shadow: 0 0 1px rgba(0,0,0,0.1); /* Improves readability */
}

h2 {
    color: #4285f4;
    margin: 10px;
    font-weight: 600;
    letter-spacing: -0.3px; /* Slightly tighter letter spacing */
}

/* Additional improvements for text elements */
p, span, a, li {
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
}

/* For SVG elements (if your graphs use SVG) */
svg {
    shape-rendering: geometricPrecision;
}

/* Improve input fields */
input, textarea, select {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}