@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --primary: #6a11cb;
    --accent: #ff3c78;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #2d3436;
    --subtext: #636e72;
    --border: #dfe6e9;
}

body.dark-mode {
    --bg: #1e272e;
    --card: #2f3640;
    --text: #f5f6fa;
    --subtext: #dcdde1;
    --border: #353b48;
}

* { box-sizing: border-box; scroll-behavior: smooth; }

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

/* Navbar */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 10%; background: var(--card);
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.logo span { background: var(--primary); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; margin-left: 5px; vertical-align: middle; }
.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem; }
.location-btn { background: #f0f3f7; padding: 5px 12px; border-radius: 20px; display: flex; align-items: center; gap: 5px; }

/* Hero */
.hero-app {
    background: white; text-align: center; padding: 5rem 1rem; margin-bottom: 2rem;
}
.hero-badge { display: inline-block; background: #eef2ff; color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; margin-bottom: 1rem; }
.hero-app h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-app h1 span { color: var(--primary); }
.hero-app p { color: var(--subtext); font-size: 1.1rem; margin-bottom: 2rem; }
.auth-card { background: var(--bg); display: inline-block; padding: 1.5rem 2rem; border-radius: 20px; }
.gps-btn { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; margin-top: 10px; }

/* Layout */
.app-layout {
    max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 2fr 1fr; gap: 2rem;
}

@media (max-width: 850px) { .app-layout { grid-template-columns: 1fr; } .navbar { padding: 0.8rem 5%; } }

/* Sections */
.app-section { margin-bottom: 3rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.section-header h2 { font-size: 1.5rem; margin: 0; }
.more-link { color: var(--primary); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.bg-light { background: var(--card); padding: 2rem; border-radius: 25px; }

/* Feed Cards */
.feed-card {
    background: var(--card); padding: 1.5rem; border-radius: 20px; margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border);
}
.user-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--subtext); margin-bottom: 0.8rem; }
.nickname { font-weight: 700; color: var(--primary); }
.feed-card h4 { margin: 0 0 0.8rem; font-size: 1.1rem; }

/* Debate */
.debate-item { background: var(--bg); padding: 1.2rem; border-radius: 15px; margin-bottom: 1rem; }
.question { font-weight: 700; margin-bottom: 0.5rem; }
.reply { color: #2ecc71; font-size: 0.9rem; padding-left: 10px; border-left: 3px solid #2ecc71; }
.write-btn { width: 100%; padding: 12px; background: white; border: 2px solid var(--primary); color: var(--primary); border-radius: 12px; font-weight: 700; cursor: pointer; }

/* Market */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.share-card { background: var(--card); padding: 1.5rem; border-radius: 20px; text-align: center; border: 1px solid var(--border); }
.share-card.highlight { border: 2px solid #ff7675; background: #fff5f5; }
.share-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.chat-btn { width: 100%; padding: 8px; background: var(--primary); color: white; border: none; border-radius: 8px; margin-top: 10px; cursor: pointer; }

/* Magazine Section (AdSense Content) */
.full-width { grid-column: 1 / -1; }
.magazine-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.magazine-card { background: var(--card); padding: 2rem; border-radius: 20px; border: 1px solid var(--border); transition: transform 0.3s ease; }
.magazine-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.magazine-card h3 { font-size: 1.3rem; margin: 0 0 1rem; color: #1f2937; line-height: 1.4; }
.magazine-card p { font-size: 0.95rem; color: #4b5563; line-height: 1.8; margin-bottom: 1.5rem; text-align: justify; }
.read-link { color: var(--primary); font-weight: 700; font-size: 0.9rem; cursor: pointer; }

/* Sidebar */
.app-sidebar > div { background: var(--card); padding: 1.5rem; border-radius: 20px; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.upload-zone { border: 2px dashed var(--border); padding: 2rem; border-radius: 15px; cursor: pointer; text-align: center; margin: 15px 0; }
.info-card h4 { margin-top: 0; color: var(--primary); }
.link { color: var(--primary); font-size: 0.85rem; font-weight: 600; }

/* Footer */
footer { background: var(--card); padding: 4rem 10% 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: space-between; margin-bottom: 2rem; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { text-decoration: none; color: var(--subtext); font-size: 0.9rem; }
.copy { text-align: center; font-size: 0.8rem; color: var(--subtext); border-top: 1px solid var(--border); padding-top: 2rem; }

.theme-toggle { background: none; border: none; font-size: 1.4rem; cursor: pointer; }