body {
    font-family: Arial, sans-serif;
    background-color: #161C29;
    color: #D6D6D6;
    margin: 0;
    padding: 20px;
    text-align: center;
    transition: background-color 0.3s ease;
}

header {
    background-color: #101117;
    color: #D6D6D6; 
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 24px;
}

footer {
    background-color: #101117;
    color: #D6D6D6; 
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

nav ul li {
    position: relative;
    display: inline-block;
}

nav ul li a {
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    color: #D6D6D6; 
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #34495e; 
    color: #5081C9;
}

.hero-section {
    background-color: #101117;
    color: #D6D6D6; 
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px; 
}

.hero-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #5081C9;
}

.hero-section p {
    font-size: 18px;
}

.products-section {
    padding: 20px;
    text-align: center;
}

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.product-card {
    position: relative;
    background-color: #101117;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.product-card:hover .product-img {
    opacity: 0.8;
    transform: scale(1.05);
}

.product-name {
    font-size: 18px;
    margin-top: 10px;
    font-weight: bold;
    color: #D6D6D6;
}

.product-description {
    font-size: 14px;
    color: #B3B3B3;
    margin-top: 10px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 16px;
    margin-top: 10px;
    color: #FFCC00;
}

.price-select {
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    background-color: #101117; 
    color: #D6D6D6;
    border: 2px solid #444;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.price-select:hover {
    background-color: #333; 
}

.price-select option {
    background-color: #101117; 
    color: #D6D6D6;
    padding: 10px;
    border-radius: 5px;
    margin: 5px 0;
}

.price-select option:checked {
    background-color: #5081C9;
}

.price-select option:hover {
    background-color: #444;
}

.buy-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 15px;
    background: #5081C9; 
    color: #D6D6D6; 
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.buy-button:hover {
    background: #2E7D32;
    transform: scale(1.1);
}

.status-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    color: #D6D6D6; 
    text-transform: uppercase;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.status-online {
    background: #00CC66; 
}

.status-edit {
    background: #FFCC00; 
    color: black;
}

.status-soon {
    background: #FFCC00; 
}

.status-offline {
    background: #FF4444; 
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.login-section {
    background-color: #101117;
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    margin: 80px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.login-section h2 {
    font-size: 28px;
    color: #D6D6D6; 
}

.login-section form {
    display: flex;
    flex-direction: column;
}

.login-section label {
    text-align: left;
    margin-bottom: 10px;
    font-size: 16px;
    color: #D6D6D6; 
}

.login-section input[type="text"],
.login-section input[type="password"] {
    padding: 10px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
}

.login-section button[type="submit"] {
    padding: 12px 18px;
    background-color: #5081C9; 
    color: #D6D6D6; 
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.login-section button[type="submit"]:hover {
    background-color: #2E7D32;
    transform: scale(1.05);
}

.register-section {
    background-color: #101117; 
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    margin: 80px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.register-section h2 {
    font-size: 28px;
    color: #D6D6D6; 
}

.register-section form {
    display: flex;
    flex-direction: column;
}

.register-section label {
    text-align: left;
    margin-bottom: 10px;
    font-size: 16px;
    color: #D6D6D6; 
}

.register-section input {
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
}

.register-section button {
    padding: 12px 18px;
    background-color: #5081C9;
    color: #D6D6D6;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.register-section button:hover {
    background-color: #2E7D32;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .product-card {
        padding: 15px;
    }

    .product-img {
        height: 250px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-description {
        font-size: 12px;
        height: 50px;
    }

    .product-price {
        font-size: 14px;
    }

    .price-select {
        font-size: 14px;
    }

    .buy-button {
        font-size: 14px;
    }

    .login-section,
    .register-section {
        max-width: 90%;
        padding: 30px;
        margin: 40px 20px;
    }

    .login-section h2,
    .register-section h2 {
        font-size: 24px;
    }

    .login-section input[type="text"],
    .login-section input[type="password"],
    .login-section button[type="submit"],
    .register-section input,
    .register-section button {
        font-size: 14px;
    }

    .login-section label,
    .register-section label {
        font-size: 14px;
    }

    .login-section form,
    .register-section form {
        gap: 10px;
    }
}

.profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.profile-card {
    background-color: #101117;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-in-out;
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
}

.profile-card:hover {
    transform: scale(1.05);
    backdrop-filter: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-header {
    margin-bottom: 15px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4CAF50;
    box-shadow: 0 5px 10px rgba(76, 175, 80, 0.5);
    transition: transform 0.3s ease-in-out;
}

.profile-avatar:hover {
    transform: scale(1.1);
}

.profile-info p {
    font-size: 16px;
    color: #D6D6D6; /* ImGuiCol_Text */
    margin: 10px 0;
    transition: color 0.3s ease-in-out;
}

.profile-info p:hover {
    color: #4CAF50;
}

.edit-button button {
    background: linear-gradient(135deg, #5081C9, #2E7D32);
    color: white;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 10px rgba(80, 129, 201, 0.3);
}

.edit-button button:hover {
    background: linear-gradient(135deg, #2E7D32, #1B5E20); 
    box-shadow: 0 7px 14px rgba(80, 129, 201, 0.5);
}

.alert {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.alert-error {
    background-color: #FFDDDD;
    color: #D8000C;
    border: 1px solid #D8000C;
}

.alert-success {
    background-color: #DDFFDD;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin: 10px 0 5px;
    font-size: 16px;
    color: #D6D6D6; 
}

input {
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
}

input[readonly] {
    background-color: #2A2F38;
    color: #A0A0A0;
    cursor: not-allowed;
    opacity: 0.8;
}

button {
    padding: 10px;
    background-color: #5081C9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #34495e;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #101117;
    min-width: 150px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    top: 100%;
    left: 0;
    z-index: 10;
}

.dropdown-content a {
    color: #D6D6D6; 
    padding: 10px;
    display: block;
    border-radius: 5px;
}

.dropdown-content a:hover {
    background-color: #34495e; 
}

.dropdown:hover .dropdown-content {
    display: block;
}

.profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.1);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); 
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    background-color: #101117;
    padding: 10px;
    width: 200px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.mobile-menu a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
}

.mobile-menu a:hover {
    background: #34495e;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination button {
    padding: 10px;
    margin: 0 10px;
    background-color: #5081C9;
    color: white;
    border: none;
    cursor: pointer;
}

.pagination button:disabled {
    background-color: #34495e;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #DDD;
}

th, td {
    padding: 8px;
    text-align: center;
}

th {
    background-color: #34495e;
}

.profile-card-history {
    background-color: #101117;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 1200px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-in-out;
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
}

.profile-card-history:hover {
    transform: scale(1.05);
    backdrop-filter: none;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #101117;
    color: #ecf0f1;
    padding-top: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
}

.sidebar a.menu-main {
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 12px 20px;
    background-color: #1a1b23;
    color: #ecf0f1;
    border-bottom: 1px solid #23242b;
    transition: background-color 0.3s;
    text-align: left; 
}

.sidebar a.menu-main span.arrow {
    margin-left: auto;
    padding-left: 10px;
}

.sidebar a.menu-main:hover {
    background-color: #2c2f3a;
}

.sidebar a.menu-sub {
    padding: 10px 0;
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    background-color: transparent;
    border-left: 3px solid transparent;
    transition: background-color 0.3s, border-color 0.3s;
}

.sidebar a.menu-sub:hover {
    background-color: #2c2f3a;
    border-left: 3px solid #007bff;
    color: #ffffff;
}

.sidebar a.menu-sub.active {
    background-color: #007bff !important;
    color: white !important;
    font-weight: bold;
}

.submenu {
    display: none;
    flex-direction: column;
    background-color: #12131a;
}

.submenu.open {
    display: flex;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    background-color: #ecf0f1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh);
}

.menu-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
}

.arrow {
    font-size: 14px;
    transition: transform 0.3s;
}

.no-select {
    user-select: none;
}

.products-section-admin {
    padding: 10px;
    text-align: center;
    border: 1px solid #444; /* เพิ่มขอบเขต */
    border-radius: 12px;
    background-color: #101117;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.product-select {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #101117; 
    color: #D6D6D6;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s ease;
    text-align: center; 
    display: flex;
    align-items: center; 
    justify-content: center; 
}

.swal-minimal {
    border-radius: 1rem !important;
    max-width: 300px !important; 
    padding: 1.5rem !important;
    font-size: 0.875rem !important; 
}

.product-card-admin {
    background-color: #101117;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.product-card-admin input {
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
    width: 100%; 
    box-sizing: border-box;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-table th, .user-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.user-table th {
    background-color: #34495e;
    color: white;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

.profile-card-info {
    background-color: #101117;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 1510px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-in-out;
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
}

.profile-card-info .header {
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.profile-card-info h1 {
    margin: 0;  
    flex-grow: 1; 
    text-align: center;  
}

.profile-card-info input {
    position: absolute;
    right: 0;  
    padding: 12px;
    font-size: 16px;
    border: 2px solid #444;
    background-color: #101117;
    color: #D6D6D6;
    border-radius: 5px;
}

.product-card-admin input[type="text"] 
{
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
}

.action-button {
    display: inline-block;
    margin-top: 10px;
    margin-right: 10px;
    padding: 10px 15px;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.edit-button {
    background: #fbc02d;
}

.edit-button:hover {
    background: #f9a825;
    transform: scale(1.05);
}

.delete-button {
    background: #e53935;
}

.delete-button:hover {
    background: #c62828;
    transform: scale(1.05);
}

.card-main {
    background-color: #101117;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;     
    gap: 15px;   
    flex-wrap: wrap;   
    align-items: stretch;
    justify-content: center; 
}

.card-tomato {
    background: #c74b30;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}  

.card-lime-green {
    background: #28A745;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}  

.card-royal-blue {
    background: #3555A3;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}  

.card-gold {
    background: #C99700;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}  

.main-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #5081C9;
}

@media (max-width: 600px) {
    .card-main {
        flex-direction: column;
        align-items: center;
    }
}

.textarea-large {
    resize: none;
    overflow: auto;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 16px;
}

.logo-container input[type="file"] {
    padding: 12px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #101117;
    color: #D6D6D6;
    font-size: 14px;
    cursor: pointer;
}

.logo-container input[type="file"]::-webkit-file-upload-button {
    background: #5081C9;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logo-container input[type="file"]::-webkit-file-upload-button:hover {
    background: #2E7D32;
}

select {
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    background-color: #101117; 
    color: #D6D6D6;
    border: 2px solid #444;
    font-size: 16px;
    transition: background-color 0.3s ease;
}