/* =============================================
   style.css — 공개 페이지 + Auth + Landing
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font: 'Inter', system-ui, sans-serif;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Auth */
    --auth-bg: #0f0f13;
    --auth-card: #1a1a22;
    --auth-border: #2a2a36;

    /* Brand */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: rgba(124, 58, 237, 0.15);

    /* Text */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
}

body {
    font-family: var(--font);
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--auth-border);
}

.btn-ghost:hover {
    background: var(--auth-card);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--auth-border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary {
    background: #27272f;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #32323f;
}

.btn-danger {
    background: #991b1b;
    color: #fff;
}

.btn-danger:hover {
    background: #7f1d1d;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ---- ALERTS ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* =============================
   AUTH PAGES
   ============================= */
.auth-body {
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-logo .logo-icon {
    font-size: 2rem;
}

.auth-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    background: #12121a;
    border: 1px solid var(--auth-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-prefix {
    display: flex;
    align-items: center;
    background: #12121a;
    border: 1px solid var(--auth-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.input-prefix .prefix {
    padding: 12px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    border-right: 1px solid var(--auth-border);
}

.input-prefix input {
    border: none;
    border-radius: 0;
    background: transparent;
}

.input-prefix input:focus {
    box-shadow: none;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============================
   LANDING PAGE
   ============================= */
.landing-body {
    background: #08080f;
    color: var(--text-primary);
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 15, 0.8);
    backdrop-filter: blur(16px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .logo-icon {
    font-size: 1.5rem;
}

.nav-logo .logo-text {
    font-size: 1.3rem;
    font-weight: 800;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 40px;
}

.hero-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #c4b5fd;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #7c3aed, #ec4899, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero-url-demo {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.9rem;
    width: fit-content;
}

.url-demo-label {
    color: var(--text-muted);
}

.url-demo-value {
    color: #a78bfa;
    font-family: monospace;
}

/* Phone mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 260px;
    height: 460px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 30px 20px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.mock-avatar {
    font-size: 3rem;
    margin-bottom: 10px;
}

.mock-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.mock-bio {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.mock-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mock-link {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    text-align: center;
    color: #c4b5fd;
}

.features {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 80px 40px;
}

.features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.05);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.landing-footer {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =============================
   PUBLIC PROFILE PAGE — THEMES
   ============================= */

/* Animated background */
.public-body {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 20px 60px;
    position: relative;
    overflow-x: hidden;
}

/* Floating orbs background */
.public-body::before,
.public-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: orb-float 8s ease-in-out infinite;
}

.public-body::before {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
}

.public-body::after {
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -80px;
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* THEMES — background + orb colors */
.theme-default {
    background: radial-gradient(ellipse at top, #1e0a3c 0%, #0a0a12 60%);
    color: #f4f4f5;
}

.theme-default::before {
    background: #7c3aed;
}

.theme-default::after {
    background: #4f46e5;
}

.theme-dark {
    background: radial-gradient(ellipse at top, #1a1a1a 0%, #080808 60%);
    color: #f4f4f5;
}

.theme-dark::before {
    background: #374151;
}

.theme-dark::after {
    background: #6b7280;
}

.theme-purple {
    background: radial-gradient(ellipse at top, #3b0764 0%, #0f0520 60%);
    color: #ede9fe;
}

.theme-purple::before {
    background: #a855f7;
}

.theme-purple::after {
    background: #7e22ce;
}

.theme-ocean {
    background: radial-gradient(ellipse at top, #0c3a6e 0%, #020d1f 60%);
    color: #e0f2fe;
}

.theme-ocean::before {
    background: #0ea5e9;
}

.theme-ocean::after {
    background: #0284c7;
}

.theme-sunset {
    background: radial-gradient(ellipse at top, #7c2d12 0%, #0c0605 60%);
    color: #ffedd5;
}

.theme-sunset::before {
    background: #f97316;
}

.theme-sunset::after {
    background: #dc2626;
}

.theme-forest {
    background: radial-gradient(ellipse at top, #14532d 0%, #020d08 60%);
    color: #d1fae5;
}

.theme-forest::before {
    background: #22c55e;
}

.theme-forest::after {
    background: #15803d;
}

/* Container */
.public-container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

/* ---- PROFILE HEADER ---- */
.public-header {
    text-align: center;
    margin-bottom: 36px;
}

/* Avatar with animated ring */
.public-avatar {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.public-avatar::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.8));
    animation: spin-ring 4s linear infinite;
    z-index: 0;
}

@keyframes spin-ring {
    to {
        transform: rotate(360deg);
    }
}

.public-avatar img,
.public-avatar .avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.public-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
}

.public-bio {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Page tabs */
.page-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.page-tab {
    padding: 7px 18px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition);
    backdrop-filter: blur(8px);
}

.page-tab:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.page-tab.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ---- LINKS ---- */
.public-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
}

/* Staggered entrance animation */
.public-links .link-card:nth-child(1) {
    animation-delay: 0.05s;
}

.public-links .link-card:nth-child(2) {
    animation-delay: 0.10s;
}

.public-links .link-card:nth-child(3) {
    animation-delay: 0.15s;
}

.public-links .link-card:nth-child(4) {
    animation-delay: 0.20s;
}

.public-links .link-card:nth-child(5) {
    animation-delay: 0.25s;
}

.public-links .link-card:nth-child(6) {
    animation-delay: 0.30s;
}

.public-links .link-card:nth-child(n+7) {
    animation-delay: 0.35s;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    animation: slide-up 0.4s ease both;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shine effect on hover */
.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.link-card:hover::before {
    left: 150%;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.link-card:active {
    transform: translateY(-1px) scale(0.99);
}

.link-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.link-card:hover .link-card-icon {
    transform: scale(1.15) rotate(-3deg);
}

.link-card-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.link-card-arrow {
    font-size: 1rem;
    opacity: 0.4;
    transition: all 0.2s ease;
}

.link-card:hover .link-card-arrow {
    opacity: 0.9;
    transform: translateX(4px);
}

.no-links {
    text-align: center;
    opacity: 0.4;
    padding: 48px 20px;
    font-size: 0.95rem;
}

/* ---- FOOTER ---- */
.public-footer {
    text-align: center;
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: inherit;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: all var(--transition);
    opacity: 0.6;
}

.powered-by:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* =============================
   SHARED AVATAR PLACEHOLDER
   ============================= */
.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.avatar-placeholder.large {
    width: 96px;
    height: 96px;
    font-size: 2.2rem;
}

/* =============================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================= */
@media (max-width: 768px) {

    /* ---- LANDING PAGE ---- */
    .landing-nav {
        padding: 12px 16px;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .nav-actions .btn {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .hero {
        flex-direction: column;
        padding: 48px 16px 32px;
        gap: 32px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-url-demo {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .phone-mockup {
        width: 200px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 24px 16px;
    }

    .landing-footer {
        padding: 20px 16px;
    }

    /* ---- AUTH (Login / Register) ---- */
    .auth-body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .auth-container {
        width: 100%;
        padding: 0;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: var(--radius);
    }

    .auth-title {
        font-size: 1.5rem;
    }

    /* ---- PUBLIC PROFILE ---- */
    .public-page {
        padding: 24px 16px;
        min-height: 100vh;
    }

    .public-container {
        max-width: 100%;
    }

    .public-name {
        font-size: 1.3rem;
    }

    .page-tabs {
        gap: 6px;
    }

    .page-tab {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .link-card {
        padding: 14px 16px;
    }

    .link-card-title {
        font-size: 0.95rem;
    }
}

/* ---- Extra small (≤ 400px) ---- */
@media (max-width: 400px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .auth-card {
        padding: 20px 16px;
    }
}