:root {
    --bg-color: #fcfcfc;
    --grid-color: #e0e0e0;
    --primary: #4caf50;
    --sidebar-bg: #ffffff;
    --text-main: #333;
    --light-gray: #f9f9f9;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Gamja Flower', cursive;
    background-color: #f0f0f0;
    color: var(--text-main);
}

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

/* Header */
.site-header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

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

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

.site-nav a:hover {
    color: var(--primary);
}

#app {
    display: flex;
    height: 80vh; /* 앱 영역 높이 조절 */
    border-bottom: 1px solid #ddd;
}

/* Sidebar Styling */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    padding: 1.5rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    overflow-y: auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.lang-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: -1rem;
}

#lang-btn {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background: #f0f0f0;
    color: #666;
}

.control-group h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #666;
}

input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-family: 'Gamja Flower', cursive;
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Gamja Flower', cursive;
    font-size: 1rem;
    transition: all 0.2s;
}

#set-seed-btn, #add-affirm-btn {
    background: #e8f5e9;
    color: var(--primary);
}

#set-seed-btn:hover, #add-affirm-btn:hover {
    background: var(--primary);
    color: white;
}

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

.secondary-btn {
    background: #f5f5f5;
    color: #999;
}

.color-picker {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
}

.color-dot.selected {
    border-color: #333;
}

.yellow { background: #fff59d; }
.pink { background: #f48fb1; }
.blue { background: #90caf9; }
.green { background: #a5d6a7; }

.sticker-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.3rem;
}

.sticker-btn {
    padding: 0.3rem;
    font-size: 1.2rem;
    background: #f9f9f9;
}

/* Workspace Styling */
#workspace-container {
    flex: 1;
    overflow: auto;
    position: relative;
    background-color: #fff;
}

#workspace {
    width: 2000px;
    height: 2000px;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    position: relative;
    cursor: grab;
}

#workspace-title {
    position: sticky;
    top: 20px;
    left: 20px;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.8;
    pointer-events: none;
    z-index: 50;
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 20px 0;
    backdrop-filter: blur(5px);
}

#connection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#node-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Node Styling */
.node {
    position: absolute;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: move;
    user-select: none;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 1.8rem;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    transition: transform 0.1s;
    background-color: #fff59d;
}

.node:hover {
    transform: scale(1.05);
}

.node.seed {
    font-size: 2.5rem;
    font-weight: bold;
    border: 3px dashed var(--primary);
    z-index: 10;
}

.node.sticker {
    background: transparent;
    box-shadow: none;
    font-size: 3rem;
    padding: 0.5rem;
}

.highlight {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(255, 235, 59, 0.4);
    z-index: -1;
    transform: rotate(-1deg);
}

/* Content Sections */
.content-section {
    padding: 5rem 0;
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
}

.content-section p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.bg-light {
    background-color: white;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.how-item {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

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

#benefits ul {
    list-style: none;
    max-width: 800px;
    margin: 3rem auto 0;
}

#benefits li {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 1.2rem;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-end;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 2rem;
    color: #777;
}

@media (max-width: 768px) {
    #app { flex-direction: column; height: auto; }
    .sidebar { width: 100%; height: auto; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links ul { justify-content: center; }
}
