:root {
    /* Tailwind CSS Color System */

    /* Slate */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Gray */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Zinc */
    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
    --zinc-950: #09090b;

    /* Neutral */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --neutral-950: #0a0a0a;

    /* Stone */
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --stone-950: #0c0a09;

    /* Red */
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;
    --red-950: #450a0a;

    /* Orange */
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    --orange-900: #7c2d12;
    --orange-950: #431407;

    /* Amber */
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --amber-950: #451a03;

    /* Yellow */
    --yellow-50: #fefce8;
    --yellow-100: #fef9c3;
    --yellow-200: #fef08a;
    --yellow-300: #fde047;
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --yellow-600: #ca8a04;
    --yellow-700: #a16207;
    --yellow-800: #854d0e;
    --yellow-900: #713f12;
    --yellow-950: #422006;

    /* Lime */
    --lime-50: #f7fee7;
    --lime-100: #ecfccb;
    --lime-200: #d9f99d;
    --lime-300: #bef264;
    --lime-400: #a3e635;
    --lime-500: #84cc16;
    --lime-600: #65a30d;
    --lime-700: #4d7c0f;
    --lime-800: #3f6212;
    --lime-900: #365314;
    --lime-950: #1a2e05;

    /* Green */
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;
    --green-950: #052e16;

    /* Emerald */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    --emerald-950: #022c22;

    /* Teal */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;
    --teal-950: #042f2e;

    /* Cyan */
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-200: #a5f3fc;
    --cyan-300: #67e8f9;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --cyan-800: #155e75;
    --cyan-900: #164e63;
    --cyan-950: #083344;

    /* Sky */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-800: #075985;
    --sky-900: #0c4a6e;
    --sky-950: #082f49;

    /* Blue */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    --blue-950: #172554;

    /* Indigo */
    --indigo-50: #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-200: #c7d2fe;
    --indigo-300: #a5b4fc;
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --indigo-800: #3730a3;
    --indigo-900: #312e81;
    --indigo-950: #1e1b4b;

    /* Violet */
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-200: #ddd6fe;
    --violet-300: #c4b5fd;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --violet-800: #5b21b6;
    --violet-900: #4c1d95;
    --violet-950: #2e1065;

    /* Purple */
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --purple-950: #3b0764;

    /* Fuchsia */
    --fuchsia-50: #fdf4ff;
    --fuchsia-100: #fae8ff;
    --fuchsia-200: #f5d0fe;
    --fuchsia-300: #f0abfc;
    --fuchsia-400: #e879f9;
    --fuchsia-500: #d946ef;
    --fuchsia-600: #c026d3;
    --fuchsia-700: #a21caf;
    --fuchsia-800: #86198f;
    --fuchsia-900: #701a75;
    --fuchsia-950: #4a044e;

    /* Pink */
    --pink-50: #fdf2f8;
    --pink-100: #fce7f3;
    --pink-200: #fbcfe8;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --pink-700: #be185d;
    --pink-800: #9d174d;
    --pink-900: #831843;
    --pink-950: #500724;

    /* Rose */
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-200: #fecdd3;
    --rose-300: #fda4af;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --rose-800: #9f1239;
    --rose-900: #881337;
    --rose-950: #4c0519;
}

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

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Malgun Gothic", sans-serif;
    background: var(--orange-50);
    min-height: 100vh;
    padding: 20px 20px 40px 20px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    position: relative;
    margin-bottom: 50px;
}

.copyright {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 15px;
    color: var(--zinc-900);
    font-weight: 400;
}

.github-button {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--zinc-900);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.2s;
    text-decoration: none;
}

.github-button:hover {
    background: #333333;
    transform: translateY(-2px);
}

/* GitHub button tooltip */
.github-button::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--zinc-900);
    color: var(--zinc-50);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.github-button:hover::after {
    opacity: 1;
}

.header-content {
    text-align: center;
}

.main-logo {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-bottom: 40px;
}

.subtitle {
    color: #666;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

.input-section {
    margin-bottom: 60px;
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

label {
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

input[type="number"],
input[type="text"] {
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid var(--zinc-300);
    border-radius: 12px;
    width: 200px;
    transition: border-color 0.3s;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--orange-500);
}

.btn-primary {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    background: var(--zinc-900);
    color: var(--zinc-50);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 24, 27, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Cards Section */
.cards-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    gap: 0;
    perspective: 1000px;
}

.card {
    position: relative;
    width: 350px;
    min-height: 450px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overscroll-behavior: contain;
}

/* 카드 겹치기 및 회전 */
.card-white {
    background: var(--zinc-50);
    transform: rotate(-3deg) translateX(-5px);
    z-index: 1;
}

.card-white .card-overlay {
    background: linear-gradient(to bottom, rgba(63, 63, 70, 0.3) 0%, rgba(63, 63, 70, 0) 100%);
}

.card-pink {
    background: var(--pink-200);
    transform: rotate(2deg);
    z-index: 2;
}

.card-pink .card-overlay {
    background: linear-gradient(to bottom, rgba(190, 24, 93, 0.3) 0%, rgba(190, 24, 93, 0) 100%);
}

.card-orange {
    background: var(--orange-400);
    transform: rotate(-4deg) translateX(5px);
    z-index: 1;
}

.card-orange .card-overlay {
    background: linear-gradient(to bottom, rgba(234, 88, 12, 0.5) 0%, rgba(234, 88, 12, 0) 100%);
}

/* 호버 효과 */
.card:hover {
    transform: rotate(0deg) translateY(-20px) scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.illustration-placeholder {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--zinc-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zinc-400);
    font-size: 12px;
}

.illustration {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.copy-icon-button {
    background: transparent;
    border: none;
    color: rgba(24, 24, 27, 0.3);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 12px;
}

.copy-icon-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(24, 24, 27, 0.6);
}

.copy-icon-button:active {
    transform: scale(0.95);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .card-overlay {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    font-family: "Pretendard Variable", Pretendard, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    height: 100%;
}

.card-body textarea {
    width: 100%;
    height: 360px;
    padding: 0;
    font-size: 14px;
    line-height: 1.8;
    border: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    color: var(--zinc-800);
    overscroll-behavior: contain;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.card-body textarea::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.card-body textarea:focus {
    outline: none;
}

.card-body textarea::placeholder {
    color: var(--zinc-400);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--zinc-900);
    color: var(--zinc-50);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .cards-section {
        flex-direction: column;
        gap: 40px;
        min-height: auto;
    }

    .card {
        width: 100%;
        max-width: 400px;
    }

    /* 모바일에서 세로 겹치기 */
    .card-white {
        transform: rotate(-3deg) translateY(-10px);
    }

    .card-pink {
        transform: rotate(2deg) translateY(-5px);
    }

    .card-orange {
        transform: rotate(-2deg) translateY(0px);
    }

    .card:hover {
        transform: rotate(0deg) translateY(-10px) scale(1.02);
    }

    .copyright {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }

    .github-button {
        display: none;
    }

    .input-group {
        flex-direction: column;
    }

    input[type="number"] {
        width: 100%;
    }

    .card {
        padding: 20px;
        min-height: 400px;
    }

    .card-body textarea {
        height: 280px;
    }

    .info-content {
        margin: 20px 20px 0;
        padding: 30px 20px;
    }

    .info-section h2 {
        font-size: 1.5rem;
    }

    .info-section h3 {
        font-size: 1.1rem;
    }

    .info-section p,
    .info-section ul li {
        font-size: 0.9rem;
    }
}

/* Visually hidden (for SEO h1) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Info Section */
.info-section {
    max-width: 800px;
    margin: 60px auto 40px;
    text-align: center;
}

.info-toggle {
    background: none;
    border: none;
    color: #ea580c; /* orange-600 */
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 10px 20px;
    font-family: inherit;
    transition: opacity 0.2s;
}

.info-toggle:hover {
    opacity: 0.7;
}

.info-content {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 40px 30px;
    color: var(--zinc-800);
    line-height: 1.8;
    text-align: left;
}

.info-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--zinc-900);
    margin-bottom: 20px;
    text-align: center;
}

.info-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--zinc-800);
    margin-top: 30px;
    margin-bottom: 15px;
}

.info-section p {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--zinc-700);
}

.info-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.info-section ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--zinc-200);
    font-size: 0.95rem;
    color: var(--zinc-700);
}

.info-section ul li:last-child {
    border-bottom: none;
}

.info-section .final-cta {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--zinc-900);
    margin-top: 30px;
    margin-bottom: 0;
}

/* Hamburger Menu - hidden on desktop */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--zinc-900);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

/* Main Navigation */
.main-nav {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}

.nav-link {
    color: var(--zinc-500);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--zinc-900);
}

.nav-link.active {
    color: var(--zinc-900);
    font-weight: 600;
}

.nav-divider {
    color: var(--zinc-300);
    font-weight: 300;
}

/* Main Footer */
.main-footer {
    text-align: center;
    padding: 60px 20px 40px;
    background: transparent;
}

.main-footer .copyright {
    position: static;
    font-size: 0.875rem;
    color: var(--zinc-900);
    font-weight: 400;
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
        top: 0;
        left: 0;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: flex-start;
        background: var(--zinc-50);
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 70px 30px 30px;
        gap: 0;
        box-shadow: none;
        overflow-y: auto;
    }

    .main-nav.open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-divider {
        display: none;
    }

    .main-nav .nav-link {
        display: block;
        width: 100%;
        padding: 16px 0;
        border-bottom: 1px solid var(--zinc-200);
        font-size: 1rem;
        color: var(--zinc-700);
    }

    .main-nav .nav-link.active {
        color: var(--zinc-900);
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .nav-overlay.active {
        display: block;
    }

    .header-content {
        text-align: center;
        padding-top: 8px;
    }

    .main-logo {
        max-width: 200px;
        margin-bottom: 16px;
    }
}
