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

:root {
    --primary-color: #8b8b3d;
    --primary-hover: #7a7a35;
    --bg-color: #e8e8e8;
    --card-bg: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --accent: #8b8b3d;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.header-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 0.35rem;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.tab:not(.active):active {
    background: rgba(0, 0, 0, 0.05);
}

.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 160px;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.result-card.animate {
    transform: scale(1.02);
}

.adjective {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.generate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.generate-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.generate-btn:active {
    transform: scale(0.96);
    background: var(--primary-hover);
}

.hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 1.5rem;
    opacity: 0.6;
}



/* Prevent text selection on mobile */
.result-card, .generate-btn {
    -webkit-user-select: none;
    user-select: none;
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    html, body {
        overflow: auto;
    }
    
    body {
        align-items: flex-start;
        padding-top: 0;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header-image {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .tabs {
        margin-bottom: 2rem;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .tab {
        padding: 0.7rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .name {
        font-size: 1.75rem;
    }
    
    .result-card {
        padding: 2.5rem 1rem;
        min-height: 160px;
        margin-bottom: 2rem;
    }
    
    .generate-btn {
        margin-top: 0.5rem;
    }
    
    .hint {
        margin-top: 2rem;
    }
}

@media (max-width: 380px) {
    .name {
        font-size: 1.5rem;
    }
}
