/* 기본 스타일 */
:root {
    --primary-color: #6c5ce7;
    --primary-color-rgb: 108, 92, 231;
    --primary-color-dark: #5a4fcf;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --text-color: #2d3436;
    --text-light: #636e72;
    --text-muted: #b2bec3;
    --background-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --bg-color: #f7fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f6f7ff 0%, #f0f4ff 100%);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 헤더 스타일 */
.header {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow-color);
    backdrop-filter: blur(10px);
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* 새로운 타이틀 섹션 스타일 */
.title-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
}

.profile-upload-overlay i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.profile-upload-overlay span {
    font-size: 0.7rem;
    font-weight: 500;
}

.profile-image:hover .profile-upload-overlay {
    opacity: 1;
}

.title-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

/* 목표 그리드 */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.goal-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    min-height: 2.5rem;
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.card-header h2 {
    font-size: clamp(1rem, 3vw, 1.6rem);
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

/* 카드 삭제 버튼 스타일 */
.delete-card-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
}

.goal-card:hover .delete-card-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-card-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.goal-section,
.reality-section,
.action-section {
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.goal-section:hover,
.reality-section:hover,
.action-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.reality-section {
    background: white;
    border: 2px solid #6B7280;
}

.reality-section h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.action-section {
    background: white;
    border: 2px solid #14B8A6;
}

.action-section h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.goal-section {
    background: white;
    border: 2px solid #3B82F6;
}

.goal-section h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.reality-section::after,
.action-section::after {
    content: '↓';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: #9CA3AF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.goal-section h3,
.reality-section h3,
.action-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.goal-section p,
.reality-section p,
.action-section p {
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

.goal-section p:hover,
.reality-section p:hover,
.action-section p:hover {
    color: #374151;
}

/* 관련 프로젝트 섹션 스타일 제거됨 */

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-btn,
.secondary-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.secondary-btn {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .card-header h2 {
        font-size: clamp(0.95rem, 4vw, 1.5rem);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .title-section {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-info h1 {
        font-size: 2rem;
    }

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

    .card-header h2 {
        font-size: clamp(0.9rem, 5vw, 1.4rem);
        line-height: 1.2;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: flex-start;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .card-header h2 {
        font-size: clamp(0.85rem, 6vw, 1.3rem);
        line-height: 1.1;
    }
    
    .card-header i {
        font-size: 1.3rem;
    }
}

/* 카드 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goal-card {
    animation: fadeIn 0.6s ease-out;
}

.goal-card:nth-child(2) {
    animation-delay: 0.1s;
}

.goal-card:nth-child(3) {
    animation-delay: 0.2s;
}

.goal-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 스크롤 부드럽게 */
html {
    scroll-behavior: smooth;
}

/* 텍스트 편집 관련 스타일 */
.edit-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1rem;
}

.edit-container textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.edit-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.edit-save-btn,
.edit-cancel-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.edit-save-btn {
    background: var(--success-color);
    color: white;
}

.edit-cancel-btn {
    background: var(--danger-color);
    color: white;
}

.edit-save-btn:hover,
.edit-cancel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-title {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-form button:hover {
    transform: translateY(-2px);
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 5px;
}

.sub-functions {
    margin-top: 2rem;
}

.sub-functions h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.functions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.function-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.function-item:hover {
    transform: translateY(-2px);
}

.function-item h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.function-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.function-details strong {
    color: var(--primary-color);
}

.last-edited {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.main-function {
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.main-function h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.main-function h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.editable {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 5px;
}

.editable:hover {
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-1px);
}

.category-icon {
    margin-right: 0.5rem;
}

.editable-text {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.editable-text:hover,
.editable-text:focus {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.editable-text::before {
    content: '✏️';
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.editable-text:hover::before,
.editable-text:focus::before {
    opacity: 1;
}

.edit-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.format-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.format-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.format-btn:hover {
    background: var(--primary-color);
    color: white;
}



.edit-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: white;
    user-select: text;
    pointer-events: auto;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.edit-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.edit-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.edit-buttons button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.edit-save-btn {
    background: var(--success-color);
    color: white;
}

.edit-save-btn:hover {
    background: #2d7a3d;
}

.edit-cancel-btn {
    background: var(--danger-color);
    color: white;
}

.edit-cancel-btn:hover {
    background: #c53030;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.editable-text ul {
    list-style: none;
    padding: 0;
}

.editable-text li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

/* 체크 기호 스타일 */
.editable-text {
    line-height: 1.8;
    display: block;
    width: 100%;
}

.check-container {
    display: block;
    width: 100%;
}

.check-line {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    clear: both;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.check-line:hover {
    background-color: rgba(16, 185, 129, 0.05);
}

.check-mark {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    color: #10b981;
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
    display: inline;
    vertical-align: top;
    line-height: 1.4;
}

.check-line:last-child {
    margin-bottom: 0;
}

/* 체크 기호가 포함된 텍스트의 각 줄 스타일 */
.editable-text p,
.editable-text div {
    margin-bottom: 0.5rem;
}

.editable-text p:last-child,
.editable-text div:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .editable-text::before {
        display: none;
    }

    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }

    .toast.show {
        transform: translateY(0);
    }

    .format-tools {
        flex-wrap: wrap;
    }

    .edit-buttons {
        flex-direction: column;
    }
}

/* 새 카드 추가 버튼 스타일 */
.add-card-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed #b0b0b0;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 1.1rem;
    gap: 1rem;
}

.add-card-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.add-card-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.add-card-btn span {
    font-weight: 500;
}

/* 새로운 카드 색상 테마 - 기본 스타일 사용 */

/* 새 카드 모달 스타일 */
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group select option {
    padding: 0.5rem;
} 