/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* General */
:root {
    --primary-color: #00BFFF; /* Deep Sky Blue */
    --secondary-color: #FFD700; /* Gold */
    --accent-color: #32CD32; /* Lime Green */
    --dark-color: #2C3E50; /* Dark Blue-Gray */
    --light-color: #ECF0F1; /* Light Gray */
    --white-color: #FFFFFF;
    --body-bg-color: #F0F8FF; /* Alice Blue */
    --card-bg-color: #FFFFFF;
    --text-color: #34495E; /* Darker Blue-Gray for main text */
    --heading-color: #2C3E50; /* Same as dark color for headings */
    --border-color: #BDC3C7; /* Silver */
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Adjusted for softer look */
}

/* Dark Mode Variables */
.dark-mode {
    --body-bg-color: #212121;
    --card-bg-color: #333333;
    --text-color: #E0E0E0;
    --heading-color: #F5F5F5;
    --border-color: #555555;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Noto Sans KR', 'Poppins', sans-serif;
    margin: 0;
    color: var(--text-color);
    background-color: var(--body-bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.3px;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 700;
}

h4 {
    font-size: 1.15rem;
    font-weight: 700;
}

h5 {
    font-size: 1rem;
    font-weight: 700;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.dark-mode-toggle:hover {
    color: var(--primary-color);
}

/* Header */
.header {
    background: var(--dark-color); /* Darker background for prominence */
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow); /* Subtle shadow for depth */
}

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

.logo {
    font-size: 1.8rem; /* Slightly larger logo */
    font-weight: 800; /* Bolder logo */
    color: var(--white-color); /* White for contrast on dark background */
}

.navbar a {
    color: var(--light-color); /* Light color for links on dark background */
    margin-left: 1.5rem;
    font-weight: 500;
    position: relative;
}

.navbar a:hover {
    color: var(--secondary-color); /* Secondary color on hover */
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color); /* Secondary color for underline */
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 100%;
}

.navbar .write-btn {
    background: var(--accent-color);
    color: var(--white-color);
    padding: 0.75rem 1.75rem;
    border-radius: 25px;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.navbar .write-btn:hover {
    background: var(--primary-color);
    color: var(--white-color);
}
.navbar .write-btn::after {
    display: none;
}

.navbar .login-link {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.75rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-left: 0.5rem;
}

.navbar .login-link:hover {
    background: #0099CC;
    color: var(--white-color);
    transform: translateY(-2px);
}

.navbar .login-link::after {
    display: none;
}


/* Hero Section (now Main Sections Grid) */
.main-sections {
    padding: 4rem 0;
    background-color: var(--body-bg-color);
}

.main-sections .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Enforce 2 columns */
    gap: 1.5rem;
}

.section-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
    transition: all 0.3s ease; /* Ensure smooth transitions */
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); /* Enhanced hover shadow */
}

.section-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.section-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-card p {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Styles for posts within section cards */
.section-posts {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.section-post-item {
    display: block;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0.7rem;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-post-item:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}


/* Post Grid (Removed) */


/* Page Header */
.page-header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--white-color);
    margin: 0;
}

.page-header p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Party Finder Content */
.party-finder-content {
    padding: 4rem 0;
}

.filter-container {
    margin-bottom: 3rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--card-bg-color); /* Updated from white-color for consistency */
    padding: 1.5rem;
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
}

.search-bar {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px; /* Slightly rounded */
    font-size: 1rem;
}

.filter-options {
    display: flex;
    gap: 0.5rem;
    flex: 1; /* make filter-options take equal available space */
}

.filter-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white-color);
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1; /* grow to fill same space as search-bar */
    width: auto;
}

.filter-options .filter-btn {
    padding: 0.75rem 1.5rem; /* Adjusted padding for button */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--primary-color);
    color: var(--white-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.party-finder-content .posts {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}


/* Write Form */
.write-form-container {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 112, 156, 0.05) 100%);
    min-height: 100vh;
}

.write-form-card {
    background: var(--card-bg-color);
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
    border-top: 4px solid #667EEA;
}

.write-form-card h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    background: linear-gradient(135deg, #667EEA 0%, #F07098 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(240, 112, 156, 0.05) 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 5px solid #667EEA;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #667EEA;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dark-mode .form-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(240, 112, 156, 0.08) 100%);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--heading-color);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--input-bg-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667EEA;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--placeholder-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* File Input Styling */
.form-group input[type="file"] {
    padding: 0;
    border: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 112, 156, 0.05) 100%);
    cursor: pointer;
    position: relative;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    padding: 0.6rem 1.2rem;
    margin: 0.6rem;
    background: linear-gradient(135deg, #667EEA 0%, #F07098 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.form-group input[type="file"]::file-selector-button {
    padding: 0.6rem 1.2rem;
    margin: 0.6rem;
    background: linear-gradient(135deg, #667EEA 0%, #F07098 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.form-instruction {
    background: #E3F2FD;
    color: #1565C0;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #4A90E2;
    font-weight: 500;
}

.dark-mode .form-instruction {
    background: #1A237E;
    color: #64B5F6;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-actions button {
    padding: 0.85rem 2.2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-actions .cancel-btn {
    background-color: var(--light-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.form-actions .cancel-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-actions .submit-btn {
    background: linear-gradient(135deg, #667EEA 0%, #F07098 100%);
    color: var(--white-color);
}

.form-actions .submit-btn:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}



/* Login Form */
.login-form-container {
    padding: 4rem 0;
}
.login-form-card {
    background: var(--card-bg-color); /* Updated from white-color for consistency */
    max-width: 450px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
    text-align: center;
}
.login-form-card h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}
.login-form-card .form-actions {
    justify-content: center;
}
.login-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* Social Login Styles */
.social-divider {
    margin: 2rem 0 1.5rem;
    position: relative;
    text-align: center;
}

.social-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.social-divider span {
    position: relative;
    background: var(--card-bg-color);
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-btn {
    background: #FFFFFF;
    color: #333333;
    border: 1px solid #DADCE0;
}

.google-btn:hover {
    background: #F8F9FA;
}

.kakao-btn {
    background: #FEE500;
    color: #000000;
}

.kakao-btn:hover {
    background: #F5DC00;
}

.naver-btn {
    background: #03C75A;
    color: #FFFFFF;
}

.naver-btn:hover {
    background: #02B350;
}

.facebook-btn {
    background: #1877F2;
    color: #FFFFFF;
}

.facebook-btn:hover {
    background: #166FE5;
}

.apple-btn {
    background: #000000;
    color: #FFFFFF;
}

.apple-btn:hover {
    background: #333333;
}

.dark-mode .google-btn {
    background: #2C2C2C;
    color: #E0E0E0;
    border: 1px solid #555555;
}

.dark-mode .google-btn:hover {
    background: #3A3A3A;
}

.dark-mode .social-divider span {
    background: var(--card-bg-color);
}

/* Authenticated Trade Content (Original removed, now mock data) */
/* The .trade-content styling is now handled by .trade-main-content for the mock data */
/* Keeping .logout-btn styles in case it's dynamically added elsewhere */
.logout-btn {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 0.75rem 1.75rem; /* Adjusted padding */
    border-radius: 25px; /* More pill-shaped */
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease; /* Ensure smooth transitions */
}
.logout-btn:hover {
    background-color: #555;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }
    .navbar {
        margin-top: 1rem;
    }
    .navbar a {
        margin: 0 0.5rem;
    }
    .hero h1 { /* This rule is effectively defunct as hero h1 is removed */
        font-size: 2.2rem;
    }

    .main-sections .container {
        grid-template-columns: 1fr;
    }

    .character-list {
        flex-direction: column;
        align-items: center;
    }

    .character-card {
        width: 80%;
        max-width: 250px;
    }

    .trade-listings {
        grid-template-columns: 1fr;
    }
}

/* Trade Main Content */
.trade-main-content {
    padding: 4rem 0;
}

.trade-main-content h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.my-characters-section,
.trade-listings-section {
    margin-bottom: 4rem;
    background: var(--card-bg-color);
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
    padding: 2.5rem;
}

.my-characters-section h2,
.trade-listings-section h2 {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--heading-color);
}

.character-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.character-card {
    background: var(--body-bg-color);
    border-radius: 12px; /* Slightly more rounded */
    padding: 1rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
    transition: all 0.3s ease; /* Ensure smooth transitions */
    width: 150px;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); /* Enhanced hover shadow */
}

.character-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.character-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0 0.2rem;
    color: var(--primary-color);
}

.character-card p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0;
}

.add-character-btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.75rem; /* Adjusted padding */
    border: none;
    border-radius: 25px; /* More pill-shaped */
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease; /* Ensure smooth transitions */
    font-weight: 600;
}

.add-character-btn:hover {
    background: var(--secondary-color);
}

.trade-listings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.trade-card {
    background: var(--body-bg-color);
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease; /* Ensure smooth transitions */
}

.trade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); /* Enhanced hover shadow */
}

.trade-card h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.trade-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.trade-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.trade-card-meta .character-name {
    font-weight: 600;
    color: var(--primary-color);
}

.trade-card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-card-footer .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.trade-card-footer .rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: #FFD700; /* Gold for stars */
}

.trade-card-footer .rating .star {
    font-size: 1.1rem;
}

.trade-card-footer .review-count {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-left: 0.3rem;
}
/* ==================== 자유게시판 스타일 ==================== */
.freeboard-header {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: var(--white-color);
}

.freeboard-header h1 {
    color: var(--white-color);
    font-size: 2.8rem;
    font-weight: 800;
}

.freeboard-content {
    padding: 3rem 0;
}

.freeboard-filter {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #4A90E2;
    position: sticky;
    top: 65px;
    z-index: 100;
}

.freeboard-filter .search-bar {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.freeboard-filter .search-bar:focus {
    border-color: #4A90E2;
    outline: none;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    margin-bottom: -1rem;
    padding-bottom: 1rem;
}

.tab-btn:hover {
    color: #4A90E2;
    border-bottom-color: #4A90E2;
}

.tab-btn.active {
    color: #4A90E2;
    border-bottom-color: #4A90E2;
}

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

.post-item {
    background: var(--card-bg-color);
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-left: 5px solid transparent;
    width: 100%;
}

.freeboard-post:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-left-color: #4A90E2;
}

.party-post:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-left-color: #F5576C;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.post-header h3 {
    margin: 0;
    font-size: 1.2rem;
    flex: 1;
}

.post-header h3 a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-header h3 a:hover {
    color: #4A90E2;
}

.category-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.badge-tip {
    background: #E3F2FD;
    color: #4A90E2;
}

.badge-news {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-question {
    background: #FCE4EC;
    color: #C2185B;
}

.badge-chat {
    background: #F3E5F5;
    color: #6A1B9A;
}

.badge-party {
    background: #FFE5E5;
    color: #F5576C;
}

.post-content-preview {
    color: var(--text-color);
    margin: 0.8rem 0 0.4rem;
    line-height: 1.5;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-color);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.post-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vote-btn.upvote:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.vote-btn.downvote:hover {
    border-color: #FF5252;
    color: #FF5252;
    background: rgba(255, 82, 82, 0.1);
}

.vote-btn.voted.upvote {
    border-color: #4CAF50;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.15);
    font-weight: 700;
}

.vote-btn.voted.downvote {
    border-color: #FF5252;
    color: #FF5252;
    background: rgba(255, 82, 82, 0.15);
    font-weight: 700;
}

/* Post Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg-color);
    margin: 3% auto;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal.active .modal-content {
    margin: 0;
    width: auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: var(--text-color);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #FF5252;
}

/* 공개 프로필용 모달 닫기 버튼 */
.public-profile-modal .modal-close {
    font-size: 1.5rem;
    float: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.public-profile-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #FF5252;
}

.modal-post-header {
    margin: 2rem 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-post-header h2 {
    margin: 0;
    color: var(--heading-color);
    flex: 1;
}

.modal-post-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.modal-post-content {
    padding: 2rem 0;
    line-height: 1.8;
    color: var(--text-color);
    min-height: 200px;
    font-size: 1.05rem;
}

.modal-post-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
}

.comments-section h3 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.8rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.submit-comment-btn {
    padding: 0.75rem 1.5rem;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-comment-btn:hover {
    background: #3A7BC8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

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

.comment-item {
    background: var(--body-bg-color);
    padding: 1.2rem;
    border-radius: 10px;
    border-left: 3px solid #4A90E2;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.comment-author {
    font-weight: 600;
    color: var(--heading-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.comment-content {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0.8rem 0;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.comment-vote {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #4A90E2;
    color: var(--white-color);
    border-color: #4A90E2;
}

.page-btn.active {
    background: #4A90E2;
    color: var(--white-color);
    border-color: #4A90E2;
}

.page-btn.prev,
.page-btn.next {
    font-weight: 600;
}

/* ==================== 파티찾기 스타일 ==================== */
.party-header {
    background: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
    color: var(--white-color);
}

.party-header h1 {
    color: var(--white-color);
    font-size: 2.8rem;
    font-weight: 800;
}

/* ==================== 아이템거래 스타일 (재설계) ==================== */
.trade-header {
    background: linear-gradient(135deg, #A18CD1 0%, #FBC2EB 100%);
    color: var(--white-color);
}

.trade-header h1 {
    color: var(--white-color);
    font-size: 2.8rem;
    font-weight: 800;
}

.trade-main-content {
    padding: 3rem 0;
}

.trade-filter-container {
    margin-bottom: 3rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-header h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--heading-color);
}

.write-post-btn {
    background: #9370DB;
    color: var(--white-color);
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.write-post-btn:hover {
    background: #8A2BE2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(147, 112, 219, 0.3);
}

.trade-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    background: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--heading-color);
}

.filter-select,
.search-bar {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus,
.search-bar:focus {
    border-color: #9370DB;
    outline: none;
}

.search-group {
    grid-column: 1 / -1;
}

.search-bar {
    width: 100%;
}

.search-sort-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.search-sort-container .search-bar {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-sort-container .search-bar:focus {
    border-color: #9370DB;
    outline: none;
}

.sort-buttons {
    display: flex;
    gap: 0.5rem;
}

.sort-btn {
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #9370DB 0%, #8A5FD4 100%);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sort-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(147, 112, 219, 0.4);
}

.sort-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(147, 112, 219, 0.3);
}

@media (max-width: 768px) {
    .search-sort-container {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-buttons {
        width: 100%;
    }

    .sort-btn {
        flex: 1;
    }
}

.trade-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.trade-item-card {
    background: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.trade-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #F5F5F5 0%, #EEEEEE 100%);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.dark-mode .card-header {
    background: linear-gradient(135deg, #424242 0%, #383838 100%);
}

.trade-type {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white-color);
}

.trade-type.sell {
    background: #FF4444;
}

.trade-type.buy {
    background: #1E90FF;
}

.trade-type.exchange {
    background: #E67E22;
}

.item-grade {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white-color);
}

.item-grade.legendary {
    background: linear-gradient(135deg, #00D4FF 0%, #00FF88 100%);
    color: #FFFFFF;
}

.item-grade.unique {
    background: #FFD700;
    color: #2C3E50;
}

.item-grade.epic {
    background: #D946EF;
}

.item-grade.rare {
    background: #87CEEB;
    color: #2C3E50;
}

.item-grade.normal {
    background: #A0A0A0;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-body h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.item-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.item-info span {
    padding: 0.3rem 0.8rem;
    background: var(--body-bg-color);
    border-radius: 6px;
    color: var(--text-color);
    font-weight: 500;
}

.dark-mode .item-info span {
    background: #404040;
}

.item-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-section .label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.price-section .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #9370DB;
}

.seller-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.rating {
    color: #FFD700;
    font-weight: 600;
}

.seller {
    color: var(--text-color);
    font-weight: 500;
}

.contact-btn {
    width: 100%;
    padding: 0.8rem;
    background: #9370DB;
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.contact-btn:hover {
    background: #8A2BE2;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .trade-listings-grid {
        grid-template-columns: 1fr;
    }

    .trade-filters {
        grid-template-columns: 1fr;
    }

    .filter-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .write-post-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==================== 메소거래 스타일 ==================== */
.mesotrade-header {
    background: linear-gradient(135deg, #48C6EF 0%, #6F86D6 100%);
    color: var(--white-color);
}

.mesotrade-header h1 {
    color: var(--white-color);
    font-size: 2.8rem;
    font-weight: 800;
}

.mesotrade-content {
    padding: 3rem 0;
}

.trade-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.trade-content-header h2 {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin: 0;
}

.trade-content-header .write-btn {
    background: var(--accent-color);
    color: var(--white-color);
    padding: 0.75rem 1.75rem;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3);
}

.trade-content-header .write-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4);
}

/* Board-specific write button colors */
.party-finder-content .trade-content-header .write-btn {
    background: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3);
}

.party-finder-content .trade-content-header .write-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4);
}

.trade-main-content .trade-content-header .write-btn {
    background: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3);
}

.trade-main-content .trade-content-header .write-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4);
}

.mesotrade-content .trade-content-header .write-btn {
    background: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3);
}

.mesotrade-content .trade-content-header .write-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4);
}

.meso-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white-color);
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
}

/* Meso Trade Filters - same as trade filters but with green accent */
.mesotrade-content .trade-filters {
    border-radius: 12px;
    background: var(--card-bg-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.mesotrade-content .filter-select:focus {
    border-color: #228B22;
}

.mesotrade-content .sort-btn {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
}

.mesotrade-content .sort-btn:hover {
    box-shadow: 0 6px 15px rgba(34, 139, 34, 0.4);
}

.meso-deal-card {
    background: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.meso-deal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.deal-type {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white-color);
    z-index: 10;
}

.deal-type.sell {
    background: #FF6B6B;
}

.deal-type.buy {
    background: #4CAF50;
}

.deal-header {
    padding: 1.5rem;
    padding-top: 2rem;
}

.deal-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.trust-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #FFE699;
    color: #7F5F00;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.meso-amount {
    padding: 1.5rem;
    background: #F5F5F5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.dark-mode .meso-amount {
    background: #404040;
}

.amount-label {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #228B22;
}

.deal-rate {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.rate-value {
    font-weight: 600;
    color: #228B22;
}

.deal-meta {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.deal-meta .server {
    font-weight: 600;
}

.deal-btn {
    width: 100%;
    padding: 1rem;
    background: #228B22;
    color: var(--white-color);
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.deal-btn:hover {
    background: #1a6b1a;
}

/* ==================== 페이지 헤더 색상 조정 ==================== */
.page-header.freeboard-header {
    color: var(--white-color);
}

.page-header.party-header {
    color: var(--white-color);
}

.page-header.trade-header {
    color: var(--white-color);
}

.page-header.mesotrade-header {
    color: var(--white-color);
}

.page-header.freeboard-header p,
.page-header.party-header p,
.page-header.trade-header p,
.page-header.mesotrade-header p {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== 응답형 디자인 ==================== */
@media (max-width: 768px) {
    .freeboard-filter {
        flex-direction: column;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }

    .post-header {
        flex-direction: column;
    }

    .post-meta {
        gap: 1rem;
    }

    .meso-listings {
        grid-template-columns: 1fr;
    }

    .mesotrade-info-cards {
        grid-template-columns: 1fr;
    }

    .mesotrade-filter {
        grid-template-columns: 1fr;
    }
}

/* ==================== Dashboard Header ==================== */
.dashboard-header {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: var(--white-color);
    padding: 3.5rem 0;
    text-align: center;
    margin-bottom: 0;
}

.dashboard-header h1 {
    color: var(--white-color);
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ==================== Dashboard Main Layout ==================== */
.dashboard-main-content {
    padding: 3rem 0;
    background: var(--body-bg-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ==================== Profile Sidebar ==================== */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}

.profile-section {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #667EEA;
}

.profile-section-expanded {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #667EEA;
    width: 100%;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-header-lg {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-avatar-lg {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.profile-avatar-xlg {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.profile-info-lg h2 {
    font-size: 2rem;
    color: var(--heading-color);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--body-bg-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #667EEA;
    display: block;
}

.stat-name {
    font-size: 0.8rem;
    color: var(--muted-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0099CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
}

.btn-danger {
    background: #FF6B6B;
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #FF5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.quick-links {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    min-width: 200px;
}

.api-section {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #FFD700;
    width: 100%;
}

.api-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--body-bg-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.75rem;
    transition: border-color 0.3s ease;
}

.api-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.btn-api {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.btn-api:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-api-secondary {
    width: 100%;
    padding: 0.75rem;
    background: var(--body-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-api-secondary:hover {
    background: #f5f5f5;
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.quick-link {
    display: block;
    padding: 0.8rem 1rem;
    background: var(--body-bg-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.quick-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-left-color: #667EEA;
    transform: translateX(5px);
}

.quick-link:last-child {
    margin-bottom: 0;
}

/* ==================== Dashboard Content Area ==================== */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-card {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-header-top {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.2rem;
}

.card-header-top h3 {
    color: #667EEA;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Characters Grid */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.character-card {
    background: linear-gradient(135deg, var(--body-bg-color) 0%, #f8f8f8 100%);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.dark-mode .character-card {
    background: linear-gradient(135deg, #404040 0%, #383838 100%);
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.character-card strong {
    display: block;
    font-size: 1.1rem;
    color: #667EEA;
    margin-bottom: 0.5rem;
}

.character-card > div {
    font-size: 0.9rem;
    color: var(--muted-color);
}

.character-card .use-nick {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.activity-column h4 {
    color: var(--heading-color);
    font-size: 1.05rem;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667EEA;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 240px;
    overflow-y: auto;
}

.activity-list > div {
    padding: 0.65rem;
    background: var(--body-bg-color);
    border-radius: 8px;
    border-left: 3px solid #667EEA;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    line-height: 1.4;
}

.activity-list > div:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.activity-list > div strong {
    color: var(--heading-color);
    display: block;
    margin-bottom: 0.25rem;
}

.activity-list > div:last-child {
    margin-bottom: 0;
}

.empty-state {
    background: var(--body-bg-color);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    display: none;
}

/* Scrollbar styling */
.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: var(--body-bg-color);
    border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #667EEA;
    border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: #764BA2;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .profile-section-expanded,
    .api-section {
        width: auto;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }

    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Dashboard Statistics Grid */
.stats-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: linear-gradient(135deg, var(--body-bg-color) 0%, #f8f9fa 100%);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #667EEA;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.dark-mode .stat-box {
    background: linear-gradient(135deg, #404040 0%, #383838 100%);
}

.dark-mode .stat-box:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-box-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-box-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #667EEA;
    line-height: 1;
}

.stat-box-label {
    font-size: 0.75rem;
    color: var(--muted-color);
    font-weight: 600;
}

/* 공개 프로필 모달 */
.public-profile-modal {
    max-width: 675px;
    border-radius: 16px;
    position: relative;
    padding: 3rem;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 2.25rem;
    margin-bottom: 2.25rem;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid rgba(189, 195, 199, 0.2);
}

.profile-avatar-modal {
    font-size: 5.25rem;
    flex-shrink: 0;
    width: 105px;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.profile-info-modal {
    flex: 1;
}

.profile-info-modal h2 {
    margin: 0 0 0.9rem 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--heading-color);
    letter-spacing: -0.3px;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    gap: 1.125rem;
    font-size: 1.1rem;
}

.stat-label {
    color: var(--muted-color);
    font-weight: 600;
    min-width: 50px;
}

.stat-row span:last-child {
    font-weight: 700;
    color: var(--heading-color);
}

.profile-rating {
    display: flex;
    justify-content: center;
    margin: 0 -3rem 2.25rem -3rem;
    padding: 1.875rem 3rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 0;
    border-top: 1px solid rgba(189, 195, 199, 0.2);
    border-bottom: 1px solid rgba(189, 195, 199, 0.2);
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-label {
    font-size: 1.1rem;
    color: var(--muted-color);
    font-weight: 600;
}

.rating-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #667EEA;
}

.rating-unit {
    font-size: 1.1rem;
    color: var(--muted-color);
}

.profile-reviews {
    background: var(--card-bg-color);
}

.profile-reviews h3 {
    margin: 0 0 1.275rem 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--heading-color);
    letter-spacing: -0.2px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0.975rem;
    max-height: 330px;
    overflow-y: auto;
}

.review-item {
    padding: 1.125rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667EEA;
    transition: background 0.2s ease;
}

.review-item:hover {
    background: rgba(102, 126, 234, 0.08);
}

.review-author {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.45rem;
}

.review-rating {
    font-size: 1rem;
    color: #FFD700;
    margin-bottom: 0.45rem;
}

.review-text {
    font-size: 1.0625rem;
    color: var(--text-color);
    line-height: 1.4;
}

.empty-message {
    text-align: center;
    color: var(--muted-color);
    font-size: 0.9rem;
    padding: 1rem 0;
    margin: 0;
}