:root {
    --primary-color: #ff8fa3;
    --primary-hover: #ff758f;
    --bg-color: #fff0f3;
    --card-bg: #ffffff;
    --text-main: #4a4a4a;
    --text-light: #888888;
    --shadow-soft: 0 10px 30px rgba(255, 143, 163, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

/* Header */
.search-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-area i {
    font-size: 3rem;
    color: var(--primary-color);
    background: white;
    padding: 20px;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
}

.search-header h1 {
    font-weight: 600;
    font-size: 2rem;
    color: #ae4e64;
    /* Darker pink for text */
}

.search-header p {
    color: var(--text-light);
    font-weight: 300;
    font-size: 1rem;
}

/* Search Box */
.search-section {
    width: 100%;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.search-box {
    background: var(--card-bg);
    padding: 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 143, 163, 0.1);
    transition: var(--transition);
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 143, 163, 0.25);
    border-color: var(--primary-color);
}

.search-icon {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-left: 20px;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 10px;
    font-size: 1rem;
    font-family: 'Prompt', sans-serif;
    color: var(--text-main);
    background: transparent;
}

.search-box input::placeholder {
    color: #ccc;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.4);
}

.search-box button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 143, 163, 0.6);
}

.search-box button:active {
    transform: translateY(1px);
}

/* Results Section */
.results-section {
    width: 100%;
    min-height: 200px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.empty-img {
    width: 150px;
    opacity: 0.7;
    mix-blend-mode: multiply;
}

/* Result Card Styling */
.result-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.result-title {
    font-weight: 600;
    color: #ae4e64;
    font-size: 1.1rem;
}

.result-badges {
    font-size: 0.8rem;
    background: #fff0f3;
    color: #ff758f;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.result-detail {
    display: flex;
    font-size: 0.95rem;
    color: var(--text-main);
}

.detail-label {
    min-width: 100px;
    color: var(--text-light);
    font-weight: 400;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-overlay.active {
    display: flex;
}

.mom-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 350px;
    text-align: center;
}

.mom-rocking {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 15px 25px rgba(255, 143, 163, 0.25));
}

.mom-group {
    transform-origin: 100px 180px;
    animation: momRock 3s ease-in-out infinite;
}

.heart {
    opacity: 0;
}

.heart.h1 {
    animation: heartFloat 2.5s ease-out infinite;
}

.heart.h2 {
    animation: heartFloat 2.5s ease-out infinite 0.8s;
}

.loader-text-wrapper .main-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ae4e64;
    margin-bottom: 8px;
    animation: pulseText 2s ease-in-out infinite;
}

.loader-text-wrapper .sub-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 300;
}

@keyframes momRock {
    0%, 100% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(4deg);
    }
}

@keyframes heartFloat {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(10px, -40px) scale(1.2);
        opacity: 0;
    }
}

@keyframes pulseText {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .search-box {
        padding: 5px;
    }

    .search-box input {
        padding: 12px 5px;
    }

    .search-box button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}


.btn-primary {
    /* รีเซ็ตค่าพื้นฐานของลิงก์ */
    text-decoration: none;
    display: inline-block;

    /* ปรับแต่งรูปร่าง */
    padding: 12px 28px;
    border-radius: 8px;
    /* ความโค้งมน */
    font-family: 'Kanit', sans-serif;
    /* หรือฟอนต์ที่คุณชอบ */
    font-weight: 500;
    font-size: 16px;

    /* สีและการตกแต่ง */
    background-color: var(--primary-color);
    /* สีน้ำเงินหลัก */
    color: white;
    border: none;

    /* ใส่เงาให้นุ่มนวล */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* ทำให้การเปลี่ยนสีดูสมูท */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* เอฟเฟกต์เมื่อเอาเมาส์ไปวาง */
.btn-primary:hover {
    background-color: #ae4e64;
    /* สีจะเข้มขึ้นเล็กน้อย */
    transform: translateY(-2px);
    /* ปุ่มจะลอยขึ้นนิดนึง */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* เอฟเฟกต์ตอนคลิก */
.btn-primary:active {
    transform: translateY(0);
}


/* Footer Styling */
.site-footer {
    width: 100%;
    margin-top: 60px;
    padding: 50px 30px 30px;
    background: linear-gradient(135deg, #ffe8ee 0%, #fff5f7 50%, #ffffff 100%);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), #ff758f, var(--primary-color));
    border-image-slice: 1;
    box-shadow: 0 -10px 40px rgba(255, 143, 163, 0.1);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 143, 163, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-content>div:first-child {
    background: white;
    padding: 25px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(255, 143, 163, 0.1);
    border: 1px solid rgba(255, 143, 163, 0.1);
    transition: var(--transition);
}

.footer-content>div:first-child:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 143, 163, 0.15);
}

.footer-content p {
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 10px;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.footer-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary-color);
    font-size: 1.3rem;
    text-decoration: none;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.2);
    border: 2px solid rgba(255, 143, 163, 0.1);
}

.footer-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 143, 163, 0.4);
    border-color: var(--primary-color);
}

/* ปรับปรุง body เพื่อให้ footer ติดขอบล่างเสมอ */
body {
    flex-direction: column;
    /* เปลี่ยนจาก center ปกติมาเป็นแนวนอน เพื่อให้ footer ต่อท้ายได้ */
    align-items: center;
}

/* Footer Link Styling */
.footer-link {
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.footer-link span {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.footer-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.footer-link:hover span {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Responsive Footer */
@media (max-width: 600px) {
    .site-footer {
        padding: 40px 20px 25px;
        margin-top: 40px;
    }

    .footer-content>div:first-child {
        padding: 20px;
    }

    .footer-links a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}