:root {
    --primary-color: #006633;
    --primary-hover: #004d26;
    --accent-color: #d4af37;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-color: #f9f9f7;
    --card-bg: #ffffff;
    --border-color: #eeeeee;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo-text {
    font-family: 'Nanum Myeongjo', serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 26px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

/* Search Section */
.search-section {
    padding: 100px 0 60px;
    text-align: center;
}

.search-title {
    font-size: 42px;
    margin-bottom: 40px;
    line-height: 1.2;
}

.search-title span {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.search-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(0, 102, 51, 0.1);
    z-index: -1;
}

.search-box-container {
    max-width: 700px;
    margin: 0 auto 30px;
}

.search-box {
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 20px 40px rgba(0, 102, 51, 0.15);
    border-color: var(--primary-color);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0 25px;
    font-size: 18px;
    font-family: inherit;
    outline: none;
}

.search-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.search-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.search-tags span {
    font-size: 13px;
    color: var(--text-muted);
    background: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-tags span:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Results Section */
.results-section {
    padding-bottom: 100px;
    min-height: 400px;
    animation: fadeIn 0.8s ease-out;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.section-subtitle {
    font-size: 28px;
}

.result-count {
    color: var(--text-muted);
    font-size: 14px;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.other-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* Featured Poster */
.featured-poster {
    width: 100%;
    margin-bottom: 40px;
}

.poster-container {
    background: linear-gradient(135deg, #004d26 0%, #006633 100%);
    border-radius: 24px;
    padding: 60px;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 50, 25, 0.2);
}

.poster-container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.poster-badge {
    background: var(--accent-color);
    color: #000;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.poster-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: center;
}

.poster-image {
    perspective: 1000px;
}

.poster-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.4);
    transform: rotateY(-10deg);
    transition: var(--transition);
}

.poster-container:hover .poster-image img {
    transform: rotateY(0deg);
}

.poster-title {
    font-size: 42px;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.2;
}

.poster-author {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 25px;
}

.poster-divider {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin-bottom: 25px;
}

.poster-desc {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 4;
}

.poster-action {
    display: flex;
    align-items: center;
    gap: 30px;
}

.poster-price {
    font-size: 24px;
    font-weight: 700;
}

.poster-btn {
    background: #fff;
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.poster-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* Book Card */
.book-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid transparent;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border-color: var(--border-color);
}

.book-cover-wrapper {
    position: relative;
    padding-top: 140%; /* 5:7 aspect ratio roughly */
    overflow: hidden;
    background: #f0f0f0;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

.book-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
     -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.book-author {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 500;
}

.book-description {
    font-size: 13px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
     -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
    line-height: 1.6;
}

.book-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f5f5f5;
}

.book-price {
    font-weight: 700;
    color: var(--text-color);
}

.view-btn {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.view-btn::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.view-btn:hover::after {
    transform: translateX(5px);
}

/* Loading & States */
.loading-state, .empty-state {
    text-align: center;
    padding: 60px 0;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Footer */
.main-footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-title { font-size: 32px; }
    .nav-links { display: none; }
    
    .poster-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .poster-image {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .poster-title { font-size: 28px; }
    
    .poster-action {
        flex-direction: column;
        gap: 20px;
    }

    .other-results-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
