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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 1.5rem;
    font-family: "Inter", "Work Sans", system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #F5F3EE 0%, #EBE7DF 100%);
    transition: background 0.6s ease;
    -webkit-font-smoothing: antialiased;
}

.generator-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 760px;
    padding-top: 10vh;
}

.generator-main.first-visit {
    justify-content: center;
    padding-top: 0;
}

.generator-header {
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 2rem;
}

.generator-card-wrapper {
    width: 100%;
    padding: 0;
}

.generator-title {
    font-family: 'Arvo', serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: color 0.5s ease;
}

.generator-title a {
    color: inherit;
    text-decoration: none;
}

.generator-tagline {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 1.25rem;
    opacity: 0.6;
    transition: color 0.5s ease;
}

.btn-generate {
    border: 2px solid;
    border-radius: 50px;
    padding: 0.65rem 2.2rem;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-generate svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.btn-generate:hover svg {
    transform: rotate(180deg);
}

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

.btn-generate.btn-first {
    margin-top: 1.5rem;
    padding: 1.2rem 3.5rem;
    font-size: 20px;
    letter-spacing: 2px;
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    animation: pulse 2s ease-in-out infinite;
}

.btn-generate.btn-first svg {
    width: 24px;
    height: 24px;
}

.btn-generate.btn-first:hover svg {
    transform: translateX(3px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.btn-generate.btn-first:hover {
    animation: none;
    transform: translateY(-1px);
    background: #333;
    border-color: #333;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.generator-card {
    width: 100%;
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
    transition: background-color 0.5s ease;
}

.first-line {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.3rem;
    width: 100%;
    text-align: center;
    text-wrap: balance;
}

.second-line {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 1.75rem;
    width: 100%;
    text-align: center;
}

#result {
    width: 100%;
}

.slogan {
    font-style: italic;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    line-height: 1.7;
    text-align: center;
    text-wrap: balance;
}

.share-links {
    margin-top: 1rem;
    font-size: 12px;
    text-align: center;
    opacity: 0.35;
    transition: color 0.5s ease, opacity 0.3s ease;
}

.share-links:hover {
    opacity: 0.6;
}

.share-links a {
    color: inherit;
    text-decoration: none;
    margin: 0 0.3rem;
    transition: text-decoration 0.2s ease;
}

.share-links a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.generator-footer {
    flex-shrink: 0;
    font-size: 14px;
    transition: color 0.5s ease;
    text-align: center;
    line-height: 1.8;
}

.generator-footer a {
    color: inherit;
}

.generator-footer .copyright {
    opacity: 0.35;
}

.generator-footer .joke-note {
    opacity: 0.5;
}

.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(16px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in .first-line {
    animation: slideInFirst 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-in .second-line {
    animation: slideInSecond 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.fade-in .slogan {
    animation: slideInSlogan 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

@keyframes slideInFirst {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInSecond {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInSlogan {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    body {
        padding: 1.5rem 1rem;
    }
    .generator-main {
        padding-top: 6vh;
    }
    .generator-title {
        font-size: 22px;
    }
    .generator-tagline {
        font-size: 16px;
    }
    .generator-card {
        padding: 2.5rem 1.25rem;
    }
    .btn-generate.btn-first {
        padding: 1rem 2.5rem;
        font-size: 17px;
    }
}
