/* ===================================
   ระบบโปรไฟล์นางแบบ-พริตตี้-ร้านนวด
   Main Stylesheet - โทนสีชมพูอมแดง + ขาว
   ฟ้อนต์ไทย Kanit จาก Google Fonts
   =================================== */

/* โหลดฟ้อนต์ Kanit จาก Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ===================================
   ตัวแปรสี (CSS Variables)
   =================================== */
:root {
    /* สีหลัก - โทนชมพูอมแดง */
    --primary-color: #e91e63;        /* ชมพูเข้ม */
    --primary-light: #f8bbd9;       /* ชมพูอ่อน */
    --primary-dark: #ad1457;        /* ชมพูเข้มมาก */
    --secondary-color: #ff5722;      /* ส้มแดง */
    --accent-color: #ff4081;         /* ชมพูสด */
    
    /* สีพื้นหลัง */
    --bg-white: #ffffff;
    --bg-light: #fce4ec;            /* ชมพูอ่อนมาก */
    --bg-gradient: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    
    /* สีข้อความ */
    --text-dark: #2c2c2c;
    --text-muted: #666666;
    --text-light: #999999;
    --text-white: #ffffff;
    
    /* สีสถานะ */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;
    
    /* เงา */
    --shadow-light: 0 2px 10px rgba(233, 30, 99, 0.1);
    --shadow-medium: 0 4px 20px rgba(233, 30, 99, 0.15);
    --shadow-heavy: 0 8px 30px rgba(233, 30, 99, 0.2);
    
    /* ขนาด */
    --border-radius: 12px;
    --border-radius-small: 8px;
    --border-radius-large: 20px;
    --container-max-width: 1200px;
    --header-height: 70px;
    --footer-height: 60px;
}

/* ===================================
   การตั้งค่าพื้นฐาน
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
}

/* ===================================
   Typography - การตั้งค่าตัวอักษร
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2.1rem; font-weight: 600; }
h3 { font-size: 1.8rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 500; }
h5 { font-size: 1.3rem; font-weight: 500; }
h6 { font-size: 1.1rem; font-weight: 500; }

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===================================
   Layout - โครงสร้างหน้า
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* ===================================
   Header - ส่วนหัว
   =================================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
}

/* ===================================
   Main Content - เนื้อหาหลัก
   =================================== */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    padding: 2rem 0;
}

.page-header {
    background: var(--bg-gradient);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===================================
   Cards - การ์ด
   =================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.card-header {
    padding: 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--primary-light);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--primary-light);
}

.card-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===================================
   Profile Cards - การ์ดโปรไฟล์
   =================================== */
.profile-card {
    position: relative;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.profile-info {
    padding: 1.5rem;
}

.profile-name {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.profile-type {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-details {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.profile-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===================================
   Buttons - ปุ่ม
   =================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: #e64a19;
    color: var(--text-white);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
    text-decoration: none;
}

.btn-success {
    background: var(--success-color);
    color: var(--text-white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--text-white);
}

.btn-error {
    background: var(--error-color);
    color: var(--text-white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===================================
   Forms - แบบฟอร์ม
   =================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-control.error {
    border-color: var(--error-color);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.form-error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===================================
   Mobile Sticky Bar - แถบติดมือถือ
   =================================== */
.mobile-stick-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
    z-index: 999;
    display: none;
}

.stick-bar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stick-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.stick-bar-item:hover,
.stick-bar-item.active {
    color: var(--primary-color);
    background: var(--bg-light);
    text-decoration: none;
}

.stick-bar-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stick-bar-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===================================
   Notifications - การแจ้งเตือน
   =================================== */
.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.notification-info {
    background: #e3f2fd;
    border-color: var(--info-color);
    color: #0d47a1;
}

.notification-success {
    background: #e8f5e8;
    border-color: var(--success-color);
    color: #1b5e20;
}

.notification-warning {
    background: #fff3e0;
    border-color: var(--warning-color);
    color: #e65100;
}

.notification-error {
    background: #ffebee;
    border-color: var(--error-color);
    color: #b71c1c;
}

/* ===================================
   Wallet - กระเป๋าเงิน
   =================================== */
.wallet-card {
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.wallet-balance {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.wallet-currency {
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.wallet-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* ===================================
   Badges & Status - ป้ายสถานะ
   =================================== */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--border-radius-small);
}

.badge-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.badge-success {
    background: var(--success-color);
    color: var(--text-white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--text-white);
}

.badge-error {
    background: var(--error-color);
    color: var(--text-white);
}

.badge-info {
    background: var(--info-color);
    color: var(--text-white);
}

.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--text-muted);
}

/* ===================================
   Loading & Spinners - โหลดดิ้ง
   =================================== */
.loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--primary-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Footer - ส่วนท้าย
   =================================== */
.footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer a {
    color: var(--primary-light);
}

.footer a:hover {
    color: var(--text-white);
}

/* ===================================
   Utility Classes - คลาสเสริม
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }

.bg-primary { background: var(--primary-color); }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--bg-white); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--shadow-light); }

/* ===================================
   Responsive Design - การตอบสนอง
   =================================== */

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .col-md-6 { flex: 0 0 50%; }
    .col-md-12 { flex: 0 0 100%; }
    
    .navbar {
        display: none;
    }
    
    .mobile-stick-bar {
        display: block;
    }
    
    .main-content {
        padding-bottom: 5rem; /* เว้นที่สำหรับ stick bar */
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .wallet-balance {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .col-sm-12 { flex: 0 0 100%; }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .wallet-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .profile-stats {
        justify-content: space-around;
    }
}

/* ===================================
   Print Styles - สไตล์พิมพ์
   =================================== */
@media print {
    .header,
    .mobile-stick-bar,
    .btn,
    .footer {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===================================
   Dark Mode Support - รองรับโหมดมืด
   =================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --text-dark: #ffffff;
        --text-muted: #cccccc;
        --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .card {
        background: #2d2d2d;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: var(--primary-color);
        color: var(--text-dark);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}