/* ===== CSS Custom Properties ===== */
:root {
    --color-bg: #fdf8f0;
    --color-surface: #ffffff;
    --color-primary: #d44c2f;
    --color-primary-hover: #b33a22;
    --color-secondary: #2c3e50;
    --color-text: #1a1a1a;
    --color-text-light: #5a5a5a;
    --color-border: #e8d5c4;
    --color-accent: #e8a838;
    --color-success: #2e7d32;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3 {
    line-height: 1.25;
    color: var(--color-secondary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--color-text-light);
    font-size: 1.05rem;
}

/* ===== Header & Navigation ===== */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo svg {
    flex-shrink: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ===== Hero ===== */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 16px auto 0;
}

/* ===== Tool Section ===== */
.tool-section {
    padding: 20px 0 60px;
}

.tool-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px 32px;
    border: 1px solid var(--color-border);
}

.section-title {
    text-align: center;
}

.input-area {
    margin-bottom: 32px;
}

.input-area label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-secondary);
}

textarea#name-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background: var(--color-bg);
    transition: border-color var(--transition);
    line-height: 1.5;
}

textarea#name-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212, 76, 47, 0.15);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(212, 76, 47, 0.35);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 76, 47, 0.45);
}

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

.btn-secondary {
    background: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text-light);
    color: var(--color-text);
}

/* ===== Result Area & Spinner ===== */
.result-area {
    text-align: center;
    padding: 24px 0;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner-display {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(var(--color-accent) 0deg 90deg, var(--color-primary) 90deg 180deg, var(--color-accent) 180deg 270deg, var(--color-primary) 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg), inset 0 0 20px rgba(0,0,0,0.1);
    transition: transform 0.1s linear;
    position: relative;
}

.spinner-display.spinning {
    animation: spin-cycle 0.08s linear infinite;
}

@keyframes spin-cycle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#current-name-display {
    background: var(--color-surface);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-secondary);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    padding: 8px;
    word-break: break-word;
}

.winner-announcement {
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-in {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.trophy {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.winner-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

/* ===== Name List Preview ===== */
.name-list-preview {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.name-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.name-chips li {
    background: var(--color-bg);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.name-chips li button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--color-primary);
    padding: 0;
    line-height: 1;
    transition: transform var(--transition);
}

.name-chips li button:hover {
    transform: scale(1.3);
}

/* ===== Use Cases Grid ===== */
.use-cases {
    padding: 60px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.info-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    color: var(--color-primary);
    margin-bottom: 16px;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 60px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.steps-list li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 1.1rem;
}

.steps-list li::before {
    content: counter(step-counter);
    background: var(--color-primary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== Tips ===== */
.tips {
    padding: 60px 0;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.tips-list li {
    padding-left: 28px;
    position: relative;
    font-size: 1.05rem;
}

.tips-list li::before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 0;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-secondary);
    color: #fff;
    padding: 32px 0;
    margin-top: auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.9rem;
    color: #aaa;
}

/* ===== About Page ===== */
.about-page {
    padding: 60px 0;
}

.about-page .container {
    max-width: 720px;
}

.about-page h1 {
    margin-bottom: 24px;
}

/* ===== Legal Pages ===== */
.legal-page {
    padding: 60px 0;
}

.legal-page .container {
    max-width: 720px;
}

.legal-page h1 {
    margin-bottom: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .tool-card {
        padding: 24px 16px;
    }

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

    .btn-primary,
    .btn-secondary {
        justify-content: center;
        width: 100%;
    }

    .spinner-display {
        width: 140px;
        height: 140px;
    }

    #current-name-display {
        width: 80px;
        height: 80px;
        font-size: 1rem;
    }

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

    .main-nav ul {
        gap: 12px;
    }

    .logo span {
        font-size: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
