/* ===== Feature Management Styles ===== */

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

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-desc {
    color: var(--text-secondary-color, #888);
    margin-bottom: 20px;
}

.feature-actions {
    margin-bottom: 20px;
}

.feature-table {
    color: var(--text-primary-color, inherit);
}

.feature-table thead th {
    background: var(--bg-secondary-color, #2a2a2a);
    color: var(--text-primary-color, #fff);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color, #444);
}

.feature-table td {
    vertical-align: middle;
    border-color: var(--border-color, #333);
}

.feature-desc-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assigned-category-list {
    margin-top: 10px;
}

.assigned-item {
    padding: 6px 10px;
    background: var(--bg-secondary-color, #2a2a2a);
    border-radius: 6px;
}

/* Modal Dark Mode */
body.dark-mode .modal-content {
    background-color: var(--bg-primary-color, #1a1a1a);
    color: var(--text-primary-color, #f0f0f0);
    border: 1px solid var(--border-color, #444);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--border-color, #444);
}

body.dark-mode .modal-footer {
    border-top-color: var(--border-color, #444);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: var(--bg-secondary-color, #2a2a2a);
    color: var(--text-primary-color, #f0f0f0);
    border-color: var(--border-color, #444);
}

/* ===== Category Page Feature Cards ===== */

.category-feature-section {
    margin-bottom: 24px;
    padding: 0 5px;
}

.feature-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary-color, #f0f0f0);
}

.feature-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary-color, #f0f0f0);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    flex: 1 1 320px;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(102, 126, 234, 0.2);
    color: var(--text-primary-color, #fff);
    text-decoration: none;
}

.feature-card:hover::before,
.feature-card:hover::after {
    opacity: 1;
}

.feature-card-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .feature-card-icon-wrap {
    transform: rotate(10deg) scale(1.1);
}

.feature-card-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.feature-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.feature-card-name {
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #8b9cf7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-card-desc {
    color: rgba(255, 255, 255, 0.9);
}

.feature-card-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-card-arrow {
    color: #8b9cf7;
    transform: translateX(8px);
    filter: drop-shadow(0 0 8px rgba(139, 156, 247, 0.5));
}

@media (max-width: 576px) {
    .feature-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}


/* ===== MBTI Test Styles ===== */

.mbti-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px;
    min-height: 60vh;
}

/* Hero Section */
.mbti-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.mbti-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

.mbti-hero-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mbti-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
}

.mbti-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
}

/* Duration Cards */
.mbti-duration-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .mbti-duration-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.duration-card {
    background: var(--bg-secondary-color, #2a2a2a);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.duration-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.duration-card.featured {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.15));
}

.duration-card.featured::after {
    content: '★';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffd700;
    font-size: 1.2rem;
}

.duration-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.duration-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.duration-card p {
    color: var(--text-secondary-color, #aaa);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.duration-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.duration-badge.quick { background: #28a74533; color: #28a745; }
.duration-badge.recommended { background: #667eea33; color: #667eea; }
.duration-badge.detailed { background: #fd7e1433; color: #fd7e14; }

/* Test Screen */
.mbti-test {
    animation: fadeIn 0.5s ease;
}

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

.test-header {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary-color, #aaa);
}

.progress-bar-wrapper {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary-color, #333);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.question-card {
    background: var(--bg-secondary-color, #2a2a2a);
    border-radius: 16px;
    padding: 30px 25px;
    margin-bottom: 20px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--bg-primary-color, #1a1a1a);
    border: 2px solid var(--border-color, #444);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--text-primary-color, #f0f0f0);
    font-size: 1rem;
    width: 100%;
}

.option-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.option-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary-color, #333);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.option-btn.selected .option-label {
    background: #667eea;
    color: #fff;
}

.option-text {
    flex: 1;
    line-height: 1.4;
}

/* Navigation */
.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.prev-btn {
    background: var(--bg-secondary-color, #333);
    color: var(--text-primary-color, #f0f0f0);
}

.prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    margin-left: auto;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    margin-left: auto;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Result Screen */
.mbti-result {
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.result-header {
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: #fff;
    margin-bottom: 30px;
}

.result-type-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.result-type {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: 5px;
}

.result-nickname {
    font-size: 1.4rem;
    font-weight: 500;
    opacity: 0.9;
}

.result-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary-color, #bbb);
    margin-bottom: 30px;
    padding: 0 10px;
}

/* Score Bars */
.result-scores {
    margin-bottom: 30px;
}

.score-dimension {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.score-label {
    width: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

.score-bar-wrapper {
    flex: 1;
    height: 24px;
    background: var(--bg-secondary-color, #333);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease;
    position: relative;
}

.score-bar-fill.left {
    background: linear-gradient(90deg, #667eea, #8b9cf7);
    float: right;
}

.score-bar-fill.right {
    background: linear-gradient(90deg, #e0678e, #764ba2);
}

.score-percentage {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    padding: 0 8px;
}


/* SNS Share Section */
.sns-share-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    text-align: center;
}

.sns-share-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-secondary-color, #aaa);
}

.sns-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sns-btn {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.sns-btn svg {
    width: 26px;
    height: 26px;
    z-index: 1;
    transition: transform 0.4s ease;
}

.sns-btn:hover {
    transform: translateY(-8px) scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.sns-btn:hover svg {
    transform: scale(1.1);
}

.sns-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sns-btn:hover::after {
    opacity: 1;
}

/* Brand Specific Colors with Glow */
.sns-btn.threads:hover {
    background: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.sns-btn.x:hover {
    background: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.sns-btn.copy:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
}

.retry-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.share-btn {
    background: var(--bg-secondary-color, #333);
    color: var(--text-primary-color, #f0f0f0);
    border: 1px solid var(--border-color, #555);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Loading */
.mbti-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-secondary-color, #333);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* History */
.mbti-history-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary-color, #2a2a2a);
    border-radius: 16px;
}

.mbti-history-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-primary-color, #1a1a1a);
    border-radius: 10px;
}

.history-type {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.history-meta {
    font-size: 0.85rem;
    color: var(--text-secondary-color, #888);
}

/* Responsive */
@media (max-width: 576px) {
    .mbti-title {
        font-size: 1.6rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .result-type {
        font-size: 2.2rem;
        letter-spacing: 4px;
    }

    .test-navigation {
        flex-wrap: wrap;
    }

    .nav-btn {
        flex: 1;
        min-width: 120px;
    }
}


/* MBTI Disclaimer */
.mbti-disclaimer-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color, #333);
    text-align: center;
}

.mbti-disclaimer-footer p {
    font-size: 0.75rem;
    color: var(--text-secondary-color, #888);
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.7;
}

/* MBTI Related Videos Grid */
.mbti-related-videos {
    border-top: 1px solid var(--border-color, #444);
    padding-top: 30px;
    margin-top: 40px !important;
}

.mbti-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mbti-video-card {
    background: var(--bg-secondary-color, #2a2a2a);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color, #333);
}

.mbti-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #667eea;
}

.mbti-video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mbti-video-thumb-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.mbti-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mbti-video-card:hover .mbti-video-thumb {
    transform: scale(1.1);
}

.mbti-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.mbti-video-card:hover .mbti-video-play-overlay {
    opacity: 1;
}

.mbti-video-info {
    padding: 15px;
}

.mbti-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: var(--text-primary-color, #fff);
}

.mbti-video-channel {
    font-size: 0.8rem;
    color: var(--text-secondary-color, #888);
}

@media (max-width: 576px) {
    .mbti-video-grid {
        grid-template-columns: 1fr;
    }
}
