body {
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
    margin: 0;
    padding: 0;
    color: mediumpurple;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    cursor: url("{% static 'images/purple_cursor.svg' %}"),
    auto;
}

header {
    background-color: transparent;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    padding: 20px 40px;
    opacity: 1;
    transition: background 0.5s ease;
    position: sticky;
    top: 0;
    z-index: 999;
}

header:hover {
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 50%, #fff8e1 100%);
}


header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links,
.nav-links-left {
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    align-self: flex-end;
}

.nav-links {
    right: 30px;
}

.nav-links-left {
    left: 30px;
}

.nav-links a,
.nav-links-left a {
    color: mediumpurple;
}


.nav-links-left a:after,
.nav-links a:after {
    border: 1px solid rgba(255, 255, 255, 0);
    bottom: 0;
    content: " ";
    display: block;
    margin: 0 auto;
    position: relative;
    -webkit-transition: all .28s ease-in-out;
    transition: all .28s ease-in-out;
    width: 0;
}

.nav-links-left a:hover:after,
.nav-links a:hover:after {
    border-color: mediumpurple;
    box-shadow: 3px 3px 3px gray;
    transition: width 350ms ease-in-out;
    width: 100%;
}


.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    /* background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    transform: translateY(-1px); */
}

.liked-products-link {
    /* background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3); */
}

.liked-products-link:hover {
    /* background: linear-gradient(135deg, #ff5252, #ff7676);
    color: white;
    border-color: #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    text-decoration: none; */
}

header .logo {
    color: mediumpurple;
    font-size: 2.2em;
    text-decoration: none;
    font-weight: bold;
}

header a:hover {
    text-decoration: none;
}

main {
    padding: 20px 0;
}

footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9em;
    background-color: #fff;
}

button {
    cursor: pointer;
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
}

/* Link reset */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Input field reset */
input[type="text"],
input[type="password"],
input[type="email"] {
    box-sizing: border-box;
}


/* 좋아요 버튼 스타일 */
.like-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid mediumpurple;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 16px;
}

/* 찜 개수 표시 스타일 */
.like-count {
    position: absolute;
    top: 10px;
    right: 50px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    z-index: 9;
    display: none;
    /* 기본적으로 숨김, 개수가 있을 때만 표시 */
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.like-count:hover {
    transform: scale(1.05);
}

.like-button:hover {
    background: mediumpurple;
    color: white;
    transform: scale(1.1);
}

.like-button.liked {
    background: mediumpurple;
    color: white;
    animation: heartBeat 0.6s ease-in-out;
}

.like-button.liked::before {
    content: "💜";
}

.like-button:not(.liked)::before {
    content: "🤍";
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.feedback-section {
    margin-top: 40px;
    text-align: center;
    grid-column: 1 / -1;
}

.feedback-section p {
    color: #555;
    margin-bottom: 20px;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.feedback-buttons button {
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.feedback-buttons .retake-test {
    background-color: #eee;
    color: #666;
    border: 1px solid #ddd;
}

.feedback-buttons .retake-test:hover {
    background-color: #e5e5e5;
}

.feedback-buttons .explore-other {
    background-color: darkslategray;
    color: white;
    border: none;
}

.feedback-buttons .explore-other:hover {
    background-color: darkgray;
}


/* 툴팁 관련 css */
.product-tooltip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background-color: mediumpurple;
    opacity: 0.8;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 100;
    display: none;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 200px;
    text-align: center;
    line-height: 1.4;
}

.product-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid mediumpurple;
}

.product-tooltip img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 5px;
    background-color: white;
}

.product-tooltip .tooltip-brand {
    font-weight: bold;
    color: #ffd700;
}

.product-tooltip .tooltip-name {
    font-weight: 500;
    margin-top: 4px;
}

.product-tooltip .tooltip-price {
    font-weight: bold;
    color: #90ee90;
    margin-top: 4px;
}

.product-circle:hover .product-tooltip {
    display: block;
}

/* 모바일 터치 최적화 */
@media (max-width: 768px) {
    /* 터치 영역 최소화 */
    .nav-link,
    .login-icon,
    .nav-links a,
    .nav-links-left a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 터치 스크롤 최적화 */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* 터치 하이라이트 제거 */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* 텍스트 선택 허용 */
    p, h1, h2, h3, h4, h5, h6, span, div {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* 입력 필드 터치 최적화 */
    input, textarea, select {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
        font-size: 16px; /* iOS 줌 방지 */
    }
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    header {
        padding: 18px 30px;
    }
    
    .nav-links,
    .nav-links-left {
        gap: 15px;
    }
    
    .nav-links {
        right: 20px;
    }
    
    .nav-links-left {
        left: 20px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .logo {
        font-size: 1.6em;
    }

    .nav-links,
    .nav-links-left {
        gap: 12px;
        position: relative;
        position: static;
        margin-top: 10px;
    }
    
    .nav-links {
        right: auto;
    }
    
    .nav-links-left {
        left: auto;
    }

    .nav-link,
    .login-icon {
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    header nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }

    .logo {
        font-size: 1.4em;
    }

    .nav-links,
    .nav-links-left {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link,
    .login-icon {
        padding: 6px 10px;
        font-size: 0.75em;
    }
    
    .nav-link:after,
    .nav-links-left a:after {
        display: none;
    }
}

@media (max-width: 360px) {
    header {
        padding: 8px 10px;
    }
    
    .logo {
        font-size: 1.2em;
    }
    
    .nav-links,
    .nav-links-left {
        gap: 5px;
    }
    
    .nav-link,
    .login-icon {
        padding: 5px 8px;
        font-size: 0.7em;
    }
}