* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

/* เพิ่มในไฟล์ style.css หรือในแท็ก <style> ในหัวของหน้า */
.chart-container {
    margin-bottom: 1px !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.chart-container h2 {
    margin-top: 0;
    margin-bottom: 1px;
    font-size: 1.1rem;
}

.chart-container canvas {
    max-height: 200px !important;
    height: 200px !important;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
}

.chart-container {
    margin-bottom: 0px;
    height: 300px; /* กำหนดความสูงที่ชัดเจน */
    position: relative; /* จำเป็นสำหรับ responsive chart */
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.back-button {
    font-size: 24px;
    color: #06c755;
    text-decoration: none;
    margin-right: 15px;
}

.header h1 {
    font-size: 20px;
    color: #333;
    flex-grow: 1;
    text-align: center;
}

.header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

/* Menu styles */
.menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
}

.menu-icon {
    font-size: 24px;
    margin-right: 15px;
}

.menu-text {
    font-size: 16px;
    font-weight: 500;
}

/* Form styles */
.form-container {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Prompt', sans-serif;
}

.btn-primary {
    display: inline-block;
    background-color: #06c755;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    width: 100%;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #05a549;
}

.btn-secondary {
    display: inline-block;
    background-color: #4a90e2;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #3a7bc8;
}

/* Profile styles */
.profile-container {
    text-align: center;
    margin-bottom: 30px;
}

.profile-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.profile-details {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

/* Message styles */
.message-container {
    margin: 20px 0;
}

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Statistics styles */
.stats-container {
    margin-bottom: 30px;
}

.stats-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.stats-data {
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.stat-label {
    flex: 1;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #06c755;
    font-size: 18px;
    margin-right: 5px;
}

.stat-unit {
    color: #666;
}

.chart-container {
 /*  margin-bottom: 30px;  */
   margin-bottom: 1px !important;  
}

.ranking-container {
    margin-top: 5px !important;  /* ลดช่องว่างด้านบน */
    margin-bottom: 20px;
}

.table-container {
    margin-top: 5px !important;  
  /*  overflow-x: auto;   */
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    font-weight: 500;
}

.share-container {
    margin-top: 20px;
    text-align: center;
}

.image-preview {
    margin-top: 10px;
    max-width: 100%;
}

.image-preview img {
    max-width: 100%;
    border-radius: 5px;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 14px;
}

.hidden {
    display: none;
}
