/* ========================================
   전역 설정
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* ========================================
   상단 네비게이션
======================================== */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;    /* 0.8rem → 1rem (헤더도 약간 키움) */
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.logo-icon {
    font-size: 2rem;
}

.logo-image {
    height: 50px;    /* 60px → 50px */
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #759999;
}

/* ========================================
   사이드바 (나의 아이디어)
======================================== */
.sidebar {
    position: fixed;
    left: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: #f8f9fa;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #759999;
    color: white;
}

.sidebar-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-content {
    padding: 1rem;
}

.idea-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid #759999;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.idea-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.idea-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
}

.idea-title {
    font-weight: 600;
    color: #2c3e50;
}

.empty-message {
    text-align: center;
    color: #95a5a6;
    padding: 2rem;
}

/* ========================================
   메인 컨테이너
======================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   헤더
======================================== */
.main-header {
    text-align: center;
    padding: 3rem 0;
}

.main-title {
    font-size: 3.5rem;    /* 8.75rem → 3.5rem (원래대로) */
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.main-subtitle {
    font-size: 1.2rem;        /* 3rem → 1.2rem (원래대로) */
    color: #7f8c8d;
    font-weight: 300;
}

/* ========================================
   아이콘 섹션 (업로드 이미지 스타일)
======================================== */
.features {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 4rem 0;
    padding: 0 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.feature-circle {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: white;
    border: 4px solid #759999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(117, 153, 153, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-circle:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(117, 153, 153, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
}

.feature-icon svg {
    width: 50px;
    height: 50px;
    stroke: #759999;
    stroke-width: 1.5;
}

.feature-text {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    text-align: center;
}

.feature-line {
    width: 60px;
    height: 4px;
    background: #e9ecef;
    margin: 0 -10px;
    align-self: flex-start;
    margin-top: 48px;
    position: relative;
    z-index: 1;
}

/* ========================================
   시작 버튼 섹션
======================================== */
.cta-section {
    text-align: center;
    margin: 4rem 0;
}

.start-button {
    background: #759999;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(117, 153, 153, 0.25);
    transition: transform 0.3s, box-shadow 0.3s;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(117, 153, 153, 0.35);
    background: #688888;
}

.start-button:active {
    transform: translateY(-1px);
}

.cta-description {
    margin-top: 1rem;
    color: #7f8c8d;
    font-size: 1rem;
}

/* ========================================
   설명 섹션
======================================== */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 4rem 0;
}

.info-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card ul,
.info-card ol {
    padding-left: 1.5rem;
    color: #555;
}

.info-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ========================================
   푸터
======================================== */
.footer {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    color: #7f8c8d;
    margin-top: 4rem;
}

/* ========================================
   반응형 디자인
======================================== */
@media (max-width: 768px) {
    .features {
        flex-direction: column;
        gap: 2rem;
    }

    .feature-line {
        width: 4px;
        height: 40px;
        margin: -10px 0;
        margin-left: 48px;
        transform: rotate(90deg);
    }

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

    .main-title {
        font-size: 2.5rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   브레인스토밍 페이지 스타일
======================================== */
.chat-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
}

.progress-step.active .step-circle {
    background: #759999;
    color: white;
    box-shadow: 0 4px 12px rgba(117, 153, 153, 0.3);
}

.progress-step.completed .step-circle {
    background: #759999;
    color: white;
}

.progress-step span {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

.chat-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.message {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

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

.message.ai {
    text-align: left;
}

.message.user {
    text-align: right;
}

.message-bubble {
    display: inline-block;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.6;
}

.message.ai .message-bubble {
    background: transparent;
    color: #2c3e50;
    border-radius: 18px;
    box-shadow: none;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    max-width: 100%;
}

.message.ai.has-background .message-bubble {
    background: #759999;
    color: white;
    box-shadow: 0 4px 12px rgba(117, 153, 153, 0.15);
    text-align: left;
    font-size: 1rem;
    font-weight: 400;
    max-width: 80%;
    border-radius: 18px;
}

.message.user .message-bubble {
    background: #e9ecef;
    color: #2c3e50;
    border-radius: 18px;
}

.input-section {
    display: flex;
    gap: 1rem;
}

.input-field {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-field:focus {
    border-color: #759999;
}

.send-button {
    background: #759999;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(117, 153, 153, 0.25);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(117, 153, 153, 0.35);
    background: #688888;
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.association-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.association-guide {
    color: #2c3e50;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

.association-tags-display {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-content: flex-start;
}

.association-input-container {
    display: flex;
    gap: 1rem;
}

.association-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    min-height: 40px;
}

.association-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #759999;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    font-size: 1rem;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.association-tag button {
    background: none;
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.association-tag button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.association-submit-button {
    width: 100%;
    background: #759999;
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(117, 153, 153, 0.3);
}

.association-submit-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(117, 153, 153, 0.4);
    background: #688888 !important;
}

.association-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.idea-result {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid #759999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.idea-result:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.idea-result h3 {
    color: #2c3e50;
    margin-bottom: 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.idea-toggle {
    font-size: 1rem;
    transition: transform 0.3s;
    color: #759999;
}

.idea-toggle.collapsed {
    transform: rotate(0deg);
}

.idea-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.idea-content.expanded {
    max-height: 1000px;
    margin-top: 1rem;
}

.idea-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.idea-analysis {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.idea-analysis h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.idea-analysis p,
.idea-analysis div {
    color: #2c3e50;
}

.loading {
    display: inline-block;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
    .progress-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .progress-step {
        flex: 0 0 calc(33.333% - 1rem);
    }
    
    .message-bubble {
        max-width: 90%;
    }
    
    .chat-container {
        padding: 1rem;
    }
}
