:root {
    --bg-color: #ffffff;
    --primary-gold: #d4af37;
    --dark-gold: #b8860b;
    --text-color: #333333;
    --sub-text: #666666;
    --card-bg: #f9f9f9;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --gold-glow: 0 5px 15px rgba(212, 175, 55, 0.2);
    --font-main: 'Noto Sans KR', sans-serif;
    --font-logo: 'Noto Sans KR', sans-serif;
    --border-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 100%);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

body:not(.sub-page) .app-container {
    justify-content: center;
    padding-top: 1rem;
}

body.sub-page .app-container {
    justify-content: flex-start;
    padding-top: 1rem;
}

/* Logo */
.main-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 1.2s ease-out;
    width: 100%;
    position: relative;
}

.header-top-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .header-top-actions {
        position: static;
        justify-content: center;
        margin-bottom: 1.5rem;
    }
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.main-logo-img, .lotte-logo-img { 
    height: auto;
    width: 450px;
    max-width: 90vw;
    display: block;
}

/* Slogan Style */
.slogan-text {
    font-family: 'Playfair Display', serif; /* Or similar elegant font */
    color: #DA291C; /* Lotte Red */
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

.main-logo-text { display: none; }

/* Menu Grid - Forced Horizontal 1 Row */
.menu-section {
    width: 100%;
    max-width: 1200px;
    animation: fadeInUp 1.2s ease-out 0.3s both;
    margin-bottom: 2rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Always 5 columns */
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 900px) {
    .menu-grid {
        gap: 0.8rem;
    }
}

@media (max-width: 600px) {
    .menu-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    .menu-grid trend-card {
        flex: 0 0 160px;
    }
}

/* Web Component Styles (Card) */
trend-card {
    display: block;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Footer */
.main-footer {
    margin-top: 4rem; /* Increased spacing */
    padding: 2rem 0;
    color: var(--sub-text);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* --- Sub Page Shared Styles --- */
.sub-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.back-btn { color: var(--text-color); transition: color 0.3s; }
.back-btn:hover { color: var(--primary-gold); }
.page-title { font-size: 1.5rem; font-weight: 700; }

/* Header Login Form */
.header-right { display: flex; align-items: center; gap: 1rem; }
.login-form {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
    align-items: center;
}
.login-form input {
    border: none;
    background: transparent;
    width: 80px; /* Reduced width */
    padding: 0.4rem 0.2rem; /* Reduced padding */
    font-size: 0.85rem;
}
.login-form input:focus { outline: none; }
.login-form button {
    background-color: var(--primary-gold);
    color: white;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
    white-space: nowrap; /* Prevent wrapping */
    min-width: 70px;
}

.login-form button:hover { background-color: var(--dark-gold); }

/* --- Write Form Accordion --- */
.write-section { margin-bottom: 3rem; }
.write-card {
    background: white;
    border-top: 3px solid var(--primary-gold);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}
.write-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.write-header:hover { background-color: #fffcf5; }
.write-header h2 { font-size: 1.1rem; color: #333; margin: 0; }
.toggle-icon { font-size: 0.8rem; color: var(--primary-gold); transition: transform 0.3s; }

.write-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}
.write-body form { padding: 2rem; }

/* Form Elements Layout */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.form-group {
    margin-bottom: 1.2rem;
    flex: 1;
    min-width: 200px;
}
.form-group.full { flex: 0 0 100%; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}
input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #fcfcfc;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}
.submit-btn {
    background-color: var(--text-color);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.submit-btn:hover { background-color: var(--primary-gold); transform: translateY(-2px); }

/* --- Board List Table --- */
.board-list-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table thead { border-bottom: 2px solid var(--primary-gold); }
.board-table th, .board-table td { padding: 1.2rem 1rem; text-align: center; border-bottom: 1px solid #f0f0f0; }
.board-table th { font-weight: 700; color: #333; font-size: 0.9rem; }
.board-table tbody tr { transition: all 0.2s; cursor: pointer; }
.board-table tbody tr:hover { background-color: #fffcf5; transform: translateX(5px); }

.col-no { width: 70px; color: #aaa; }
.col-title { text-align: left !important; font-weight: 600; padding-left: 2rem !important; }
.col-author { width: 180px; font-size: 0.85rem; }
.col-date { width: 130px; color: #999; font-size: 0.8rem; }

/* Search Bar (Sub Page) */
.list-controls { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.search-bar {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.search-bar select, .search-bar input { border: none; background: transparent; padding: 0.4rem; }
.search-bar input { width: 200px; }
.search-bar button {
    background-color: var(--text-color);
    color: white;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent wrapping */
    min-width: 60px;
}

/* --- Animations --- */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- Detail Page --- */
.detail-view { max-width: 800px; margin: 0 auto; }
.post-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 5px 30px rgba(0,0,0,0.05); margin-bottom: 3rem; border: 1px solid var(--border-color); }
.post-gallery img { width: 100%; display: block; }
.post-header { padding: 2rem; border-bottom: 1px solid #f0f0f0; }
.post-meta-top { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.team-tags-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-date { color: #999; font-size: 0.85rem; }
.post-title { font-size: 1.8rem; font-weight: 800; line-height: 1.3; margin-bottom: 1.5rem; }
.post-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 40px; height: 40px; background-color: var(--primary-gold); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.author-info .name { font-weight: 600; font-size: 0.95rem; }
.post-body { padding: 2rem; font-size: 1.05rem; line-height: 1.8; color: #444; }

.post-actions { 
    padding: 1rem 2rem 2rem; 
    display: flex; 
    justify-content: space-between; 
}

.left-actions, .right-actions {
    display: flex;
    gap: 0.5rem; /* Tighter gap */
}

.action-btn { 
    display: flex; 
    align-items: center; 
    gap: 0.4rem; 
    padding: 0.4rem 0.8rem; /* Smaller padding */
    border-radius: 20px; 
    border: 1px solid #ddd; 
    background: white; 
    cursor: pointer; 
    font-size: 0.8rem; /* Smaller font */
    transition: all 0.2s; 
    white-space: nowrap;
}

.action-btn:hover { background: #f9f9f9; }
.delete-btn { color: #e74c3c; border-color: #fadbd8; }
.list-btn { text-decoration: none; color: var(--text-color); }

/* Like Button Animation */
.like-btn svg {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn.active {
    border-color: #e74c3c;
    background-color: #fff5f5;
    color: #e74c3c;
}

.like-btn.active svg {
    fill: #e74c3c;
    stroke: #e74c3c;
    transform: scale(1.2);
}

.like-count {
    margin-left: 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Share Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.share-link-box {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    background: #f9f9f9;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

.share-url {
    flex: 1;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: 1px solid #ddd;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Comment Form Updates */
.comment-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.comment-inputs input {
    width: 140px; /* Compact inputs */
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Comment Item Actions */
.comment-actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comment-delete-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

.comment-delete-btn:hover {
    color: #e74c3c;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.comments-section h3 .count {
    color: var(--primary-gold);
}

.comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-form textarea {
    flex: 1;
    min-height: 50px;
    resize: none;
}

/* Comment Submit Button - Match Edit Button */
.comment-form button {
    padding: 0.4rem 1.2rem;
    background: white;
    color: var(--text-color);
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.comment-form button:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    background-color: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.comment-header .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-header .date {
    font-size: 0.8rem;
    color: #aaa;
}


/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-recruiting {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-matched {
    background-color: #f1f8e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

/* Date Range Inputs */
.date-range-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-separator {
    color: #999;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}

/* Comment Selection */
.comment-item {
    position: relative;
    transition: background-color 0.3s;
}

.comment-item.selected {
    background-color: #fffcf5;
    border: 1px solid var(--primary-gold);
    border-radius: 8px;
    padding: 1rem;
}

.comment-item.selected::after {
    content: '채택됨';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.select-comment-btn {
    margin-top: 0.5rem;
    background-color: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.select-comment-btn:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

/* Table Column Visibility Helper */
.col-store, .col-brand, .col-status {
    width: 120px;
    font-size: 0.9rem;
    color: #555;
}

/* Detail specific fields */
.detail-field {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.detail-label {
    font-weight: 700;
    color: var(--primary-gold);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.detail-value {
    font-size: 1.05rem;
    color: #333;
}