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

/* Screen Reader Only - For Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari */
    padding: 20px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: -webkit-fill-available;
    scroll-behavior: smooth;
}

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

/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-brand a {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand a:hover {
    color: #764ba2;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover {
    color: #667eea;
    background: #f8f9fa;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Header */
header {
    text-align: center;
    color: #333;
    margin-bottom: 50px;
    padding: 40px 20px;
    border-bottom: 2px solid #f0f0f0;
    scroll-margin-top: 80px;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #333;
}

.logo .highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 20px;
    border-radius: 8px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Main Content */
main {
    background: white;
    padding: 40px 20px;
}

/* Smooth scroll for all sections */
section {
    scroll-margin-top: 80px;
}

/* Link styles */
a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Generator Section */
.generator-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

.form-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.generate-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

/* Result Container */
.result-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.result-header h3 {
    font-size: 1.5rem;
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

.result-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 1.05rem;
}

.result-content .headcanon-item {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.result-content .headcanon-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.5rem;
}

/* How it Works Section */
.how-it-works {
    margin-bottom: 60px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #667eea;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases {
    margin-bottom: 60px;
}

.use-cases h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.use-case {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.use-case:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.use-case .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.use-case h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.use-case p {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 60px;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #f8f9fa;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.faq-item h3 {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.faq-item p {
    color: #666;
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 2px solid #f0f0f0;
}

footer p {
    margin-bottom: 10px;
}

footer .note {
    color: #999;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN - 全面移动端优化
   ============================================ */

/* 基础移动端样式 - 适用于所有移动设备 */
@media (max-width: 768px) {
    body {
        padding: 0;
        padding-top: 60px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        padding-bottom: env(safe-area-inset-bottom, 20px);
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
        padding: clamp(5px, 2vw, 15px);
    }
    
    /* Mobile Navigation */
    .main-nav {
        padding: 12px 15px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-brand a {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
    }
    
    .nav-links a {
        padding: 6px 8px;
        font-size: 0.85rem;
    }
    
    /* Back to Top Button - Mobile */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    header {
        padding: clamp(12px, 3vh, 25px) clamp(5px, 2vw, 15px);
        margin-bottom: clamp(12px, 3vh, 25px);
        overflow-x: hidden;
    }
    
    .logo h1 {
        font-size: clamp(1.25rem, 4.5vw, 2rem);
        line-height: 1.3;
        margin-bottom: clamp(8px, 2vh, 15px);
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .logo .highlight {
        padding: clamp(2px, 0.5vw, 8px) clamp(8px, 2vw, 15px);
        display: inline-block;
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    .subtitle {
        font-size: clamp(0.8rem, 3.2vw, 1rem);
        padding: 0 clamp(5px, 1vw, 10px);
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    main {
        padding: clamp(12px, 3vh, 25px) clamp(5px, 2vw, 15px);
        margin-bottom: clamp(12px, 3vh, 25px);
        overflow-x: hidden;
    }
    
    .generator-section {
        gap: clamp(12px, 3vh, 25px);
        margin-bottom: clamp(25px, 5vh, 45px);
        width: 100%;
    }
    
    .form-container {
        padding: clamp(12px, 3vw, 25px) clamp(10px, 2.5vw, 20px);
        margin-bottom: clamp(12px, 3vh, 25px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: clamp(12px, 3vh, 22px);
        width: 100%;
    }
    
    .form-group label {
        font-size: clamp(0.9rem, 3.5vw, 1.05rem);
        margin-bottom: clamp(6px, 1.5vh, 10px);
        display: block;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: clamp(10px, 2.5vw, 14px);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        touch-action: manipulation;
    }
    
    .form-group textarea {
        min-height: clamp(70px, 15vh, 100px);
        width: 100%;
    }
    
    .generate-btn {
        font-size: clamp(0.95rem, 3.8vw, 1.15rem);
        padding: clamp(12px, 3vh, 16px) clamp(16px, 4vw, 22px);
        width: 100%;
        max-width: 100%;
        margin-top: clamp(8px, 2vh, 12px);
        min-height: 48px; /* Touch target size */
        touch-action: manipulation;
        box-sizing: border-box;
    }
    
    .result-container {
        padding: clamp(12px, 3vw, 25px) clamp(10px, 2.5vw, 20px);
        margin-top: clamp(12px, 3vh, 25px);
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(8px, 2vh, 12px);
        width: 100%;
    }
    
    .result-header h3 {
        font-size: clamp(1.1rem, 4.2vw, 1.4rem);
        margin-bottom: 0;
        word-wrap: break-word;
    }
    
    .action-buttons {
        width: 100%;
        gap: clamp(8px, 2vw, 12px);
        flex-direction: row;
        display: flex;
    }
    
    .action-btn {
        flex: 1;
        padding: clamp(10px, 2.5vh, 14px);
        font-size: clamp(0.85rem, 3.2vw, 1rem);
        min-height: 44px; /* Touch target size */
        touch-action: manipulation;
        box-sizing: border-box;
        white-space: nowrap;
    }
    
    .result-content {
        padding: clamp(12px, 3vw, 25px) clamp(10px, 2.5vw, 20px);
        font-size: clamp(0.85rem, 3.5vw, 1rem);
        line-height: 1.7;
        width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .result-content .headcanon-item {
        padding-left: clamp(12px, 3vw, 18px);
        margin-bottom: clamp(12px, 3vh, 20px);
        font-size: clamp(0.85rem, 3.5vw, 1rem);
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .how-it-works {
        margin-bottom: clamp(25px, 5vh, 45px);
        width: 100%;
        overflow-x: hidden;
    }
    
    .how-it-works h2,
    .use-cases h2 {
        font-size: clamp(1.4rem, 5vw, 2rem);
        margin-bottom: clamp(18px, 4vh, 30px);
        word-wrap: break-word;
        padding: 0 clamp(5px, 1vw, 10px);
    }
    
    .steps {
        gap: clamp(12px, 2.5vh, 18px);
        width: 100%;
    }
    
    .step {
        padding: clamp(15px, 3.5vw, 25px) clamp(12px, 3vw, 20px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .step-number {
        width: clamp(42px, 9vw, 55px);
        height: clamp(42px, 9vw, 55px);
        font-size: clamp(1.1rem, 3.8vw, 1.4rem);
        margin-bottom: clamp(10px, 2.5vh, 18px);
    }
    
    .step h3 {
        font-size: clamp(1rem, 3.8vw, 1.15rem);
        margin-bottom: clamp(8px, 1.5vh, 12px);
        word-wrap: break-word;
    }
    
    .step p {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
        word-wrap: break-word;
    }
    
    .use-case-grid {
        grid-template-columns: 1fr;
        gap: clamp(12px, 2.5vh, 18px);
        width: 100%;
    }
    
    .use-case {
        padding: clamp(15px, 3.5vw, 25px) clamp(12px, 3vw, 20px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .use-case .icon {
        font-size: clamp(1.6rem, 4.5vw, 2.2rem);
        margin-bottom: clamp(10px, 2vh, 15px);
    }
    
    .use-case h3 {
        font-size: clamp(1rem, 3.8vw, 1.15rem);
        margin-bottom: clamp(6px, 1.5vh, 10px);
        word-wrap: break-word;
    }
    
    .use-case p {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
        word-wrap: break-word;
    }
    
    .faq-section {
        margin-bottom: clamp(30px, 5vh, 50px);
        width: 100%;
        overflow-x: hidden;
    }
    
    .faq-section h2 {
        font-size: clamp(1.4rem, 5vw, 2rem);
        margin-bottom: clamp(20px, 4vh, 35px);
        padding: 0 clamp(5px, 1vw, 10px);
    }
    
    .faq-container {
        width: 100%;
        padding: 0;
    }
    
    .faq-item {
        padding: clamp(15px, 3vw, 25px) clamp(12px, 2.5vw, 25px);
        margin-bottom: clamp(12px, 2.5vh, 18px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .faq-item h3 {
        font-size: clamp(1rem, 3.8vw, 1.15rem);
        margin-bottom: clamp(10px, 2vh, 15px);
        word-wrap: break-word;
    }
    
    .faq-item p {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
        line-height: 1.6;
        word-wrap: break-word;
    }
    
    footer {
        padding: clamp(20px, 4vh, 35px) clamp(10px, 2.5vw, 20px);
        margin-top: clamp(20px, 4vh, 35px);
        padding-bottom: env(safe-area-inset-bottom, 25px);
        width: 100%;
        box-sizing: border-box;
    }
    
    footer p {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
        word-wrap: break-word;
    }
}

/* ============================================
   精确断点 - 针对具体 iPhone 型号
   ============================================ */

/* iPhone SE (1st/2nd/3rd gen) - 320px */
@media (max-width: 320px) {
    .nav-links {
        gap: 8px;
    }
    
    .nav-links a {
        padding: 5px 6px;
        font-size: 0.75rem;
    }
    
    .nav-brand a {
        font-size: 0.95rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }
    
    .logo .highlight {
        padding: 2px 8px;
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .form-container,
    .result-container {
        padding: 12px 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 8px;
        font-size: 16px;
    }
    
    .generate-btn {
        font-size: 0.95rem;
        padding: 12px 15px;
    }
    
    .result-content {
        font-size: 0.85rem;
        padding: 12px 8px;
    }
    
    .result-content .headcanon-item {
        margin-bottom: 12px;
        padding-left: 12px;
    }
    
    .step,
    .use-case {
        padding: 15px 10px;
    }
}

/* iPhone 6/7/8, X/XS/11 Pro, 12/13 mini - 375px */
@media (min-width: 321px) and (max-width: 375px) {
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 5px 7px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo .highlight {
        padding: 3px 10px;
    }
    
    .subtitle {
        font-size: 0.88rem;
    }
    
    .form-container,
    .result-container {
        padding: 15px 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .generate-btn {
        font-size: 1.05rem;
        padding: 14px 18px;
    }
    
    .result-content {
        font-size: 0.9rem;
        padding: 15px 10px;
    }
    
    .result-content .headcanon-item {
        margin-bottom: 15px;
        padding-left: 14px;
    }
}

/* iPhone 12/13/14 标准版 - 390px */
@media (min-width: 376px) and (max-width: 390px) {
    body {
        padding: 10px;
    }
    
    .logo h1 {
        font-size: 1.65rem;
    }
    
    .subtitle {
        font-size: 0.92rem;
    }
    
    .form-container,
    .result-container {
        padding: 18px 12px;
    }
}

/* iPhone 6/7/8 Plus, XR/11, 12/13 Pro Max - 414-430px */
@media (min-width: 391px) and (max-width: 430px) {
    body {
        padding: 12px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .form-container,
    .result-container {
        padding: 20px 15px;
    }
    
    .generate-btn {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    
    .result-content {
        font-size: 0.95rem;
    }
}

/* 大屏手机和折叠屏 - 431-768px */
@media (min-width: 431px) and (max-width: 768px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .form-container,
    .result-container {
        padding: 25px 20px;
    }
    
    .generate-btn {
        font-size: 1.15rem;
        padding: 16px 24px;
    }
}

/* 折叠屏展开状态 */
@media (min-width: 600px) and (max-width: 768px) {
    .use-case-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-nav {
        padding: 18px 25px;
    }
    
    .nav-brand a {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 0.95rem;
    }
    
    .logo h1 {
        font-size: 3rem;
    }
    
    .use-case-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-to-top {
        bottom: 25px;
        right: 25px;
    }
}

/* 横屏模式 - 所有手机 */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 50px;
    }
    
    .container {
        padding: 10px 15px;
    }
    
    .main-nav {
        padding: 8px 15px;
    }
    
    .nav-brand a {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    header {
        padding: 12px 15px;
        margin-bottom: 12px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    main {
        padding: 15px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        margin-bottom: 5px;
    }
    
    .form-group textarea {
        min-height: 60px;
    }
    
    .generate-btn {
        padding: 12px 20px;
    }
    
    .how-it-works,
    .use-cases {
        margin-bottom: 25px;
    }
    
    .step,
    .use-case {
        padding: 15px;
    }
}

/* iPhone X/11/12/13/14 系列（带刘海/药丸屏） */
@media only screen 
    and (device-width: 390px) 
    and (device-height: 844px) 
    and (-webkit-device-pixel-ratio: 3) {
    body {
        padding-top: env(safe-area-inset-top, 20px);
        padding-left: env(safe-area-inset-left, 10px);
        padding-right: env(safe-area-inset-right, 10px);
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 1.5px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .generate-btn,
    .action-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .form-group input,
    .form-group select {
        min-height: 44px;
    }
}

/* Loading Animation */
.generate-btn.loading {
    position: relative;
    color: transparent;
}

.generate-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

