/* ============================================
   Phone Vibrator - Complete Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #f78da8;
    --primary-dark: #ff4081;
    --primary-light: #ff9eb5;
    --primary-hover: #ff8fae;
    --primary-deep: #d64d73;
    --white: #ffffff;
    --off-white: #fff5f8;
    --bg-light: #fff0f5;
    --bg-section: #f9f9f9;
    --text-dark: #333333;
    --text-body: #555555;
    --text-muted: #666666;
    --text-light: #999999;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(255, 64, 129, 0.4);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 40px;
    --radius-xl: 200px;
    --radius-btn: 40px;
    --transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    --max-width: 1200px;
    --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0; padding: 0;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; font-weight: 700; line-height: 1.2; }
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }

/* --- Skip Link --- */
.skip-link {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
    background: var(--primary-dark); color: var(--white);
    padding: 10px 20px; border-radius: var(--radius-sm); z-index: 9999;
}
.skip-link:focus { left: 20px; top: 20px; width: auto; height: auto; }

/* --- Header --- */
.app-header {
    background: var(--primary);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-container {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 20px; height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--white); font-weight: 700; font-size: 1.2rem;
    text-decoration: none;
}
.logo i { font-size: 1.4rem; }
.logo:hover { color: var(--white); }

.lang-select {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: var(--white); padding: 8px 32px 8px 12px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-family: inherit; cursor: pointer; outline: none;
    margin-right: 10px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    background-size: 18px; min-width: 120px;
}
.lang-select:hover { background-color: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }
.lang-select:focus { border-color: var(--white); box-shadow: 0 0 0 2px rgba(255,255,255,0.2); }
.lang-select option { background: var(--primary-dark); color: var(--white); padding: 10px; }

.main-nav { display: flex; gap: 5px; }
.nav-link {
    color: rgba(255,255,255,0.85); padding: 8px 16px;
    border-radius: var(--radius-sm); font-weight: 500;
    font-size: 0.95rem; transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,0.15); }

.menu-toggle {
    display: none; background: none; border: none;
    color: var(--white); font-size: 1.5rem; cursor: pointer;
    padding: 8px;
}

/* --- Main Content --- */
.app-main { flex: 1; }
.view { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ============================================
   HOME VIEW
   ============================================ */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 60px 20px 40px; text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 8px; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.hero .subtitle { font-size: clamp(1rem, 3vw, 1.3rem); color: rgba(255,255,255,0.9); margin-bottom: 40px; font-weight: 400; }

.vibrator-card {
    background: var(--white); padding: 60px 25px 40px;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 380px;
    display: flex; flex-direction: column; align-items: center;
    position: relative;
}
.vibrator-card::before {
    content: ''; width: 60px; height: 6px;
    background: #eee; border-radius: 10px;
    position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
}

.buttons-grid { display: flex; flex-direction: column; gap: 12px; width: 100%; align-items: center; margin-top: 10px; }
.vib-btn {
    background: var(--primary-light); color: var(--white);
    border: none; border-radius: var(--radius-btn);
    padding: 16px 30px; font-size: 1.1rem; font-weight: 700;
    font-family: inherit; cursor: pointer; width: 100%; max-width: 280px;
    transition: all var(--transition); box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden; user-select: none;
}
.vib-btn:hover { transform: translateY(-2px); background: var(--primary-hover); box-shadow: var(--shadow-md); }
.vib-btn:active { transform: scale(0.96); }
.vib-btn:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 2px; }
.vib-btn.active { background: var(--primary-dark); box-shadow: inset 0 2px 5px rgba(0,0,0,0.2), var(--shadow-glow); animation: pulse-btn 1s infinite alternate; }
@keyframes pulse-btn { from { transform: scale(1); } to { transform: scale(1.03); } }

.note { margin-top: 25px; font-size: 0.85rem; color: var(--text-light); text-align: center; line-height: 1.4; max-width: 280px; }

/* --- Download Section --- */
.download-section { background: var(--off-white); padding: 80px 20px; text-align: center; color: var(--text-dark); }
.download-section h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 15px; }
.download-section h4 { font-size: 1.1rem; font-weight: 400; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }
.app-logo { height: 100px; margin-bottom: 20px; }
.store-badge img { width: 200px; transition: transform var(--transition); }
.store-badge img:hover { transform: scale(1.05); }

/* --- Features Section --- */
.features-wrapper { padding: 60px 20px; background: var(--white); color: var(--text-dark); }
.features-container {
    background-image: url('https://tafhub.com/wp-content/uploads/2021/03/breathing_calm_down_meditation_yoga_zen_lotus.jpg');
    background-attachment: fixed; background-position: center; background-size: cover;
    border-radius: var(--radius-md); overflow: hidden; padding: 80px 20px;
    max-width: var(--max-width); margin: 0 auto;
}
.features-overlay {
    background: rgba(255,255,255,0.95); border-radius: var(--radius-md);
    padding: 60px 40px; max-width: 900px; margin: 0 auto; text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.features-overlay h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 15px; }
.features-overlay > p { margin-bottom: 50px; font-size: 1.1rem; color: var(--text-muted); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; text-align: left; }
.feature-item h3 { color: var(--primary-deep); font-size: 1.3rem; margin-bottom: 10px; }
.feature-item p { color: var(--text-muted); font-size: 0.95rem; }

/* ============================================
   PATTERNS VIEW
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 20px; text-align: center; color: var(--white);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; }
.page-hero p { font-size: 1.2rem; opacity: 0.9; }

.patterns-page { padding: 60px 20px; max-width: 1000px; margin: 0 auto; }
.patterns-intro { font-size: 1.1rem; color: var(--text-muted); text-align: center; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.pattern-card {
    border: 1px solid #eee; border-radius: var(--radius-md);
    padding: 25px; transition: all var(--transition); background: var(--white);
    cursor: pointer;
}
.pattern-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pattern-icon { font-size: 2rem; color: var(--primary); margin-bottom: 15px; }
.pattern-card h3 { color: var(--primary-dark); margin-bottom: 8px; font-size: 1.2rem; }
.pattern-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.pattern-card .pattern-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.pattern-tag { background: var(--bg-light); color: var(--primary-dark); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }

/* ============================================
   HOW IT WORKS VIEW
   ============================================ */
.howto-page { padding: 60px 20px; max-width: 800px; margin: 0 auto; }
.step { display: flex; gap: 20px; margin-bottom: 30px; padding: 25px; border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.step-num { background: var(--primary-dark); color: var(--white); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; flex-shrink: 0; }
.step-content h3 { color: var(--primary-dark); margin-bottom: 8px; }
.step-content p { color: var(--text-muted); margin: 0; }

.device-section { background: var(--off-white); padding: 30px; border-radius: var(--radius-md); margin: 30px 0; }
.device-section h3 { color: var(--primary-dark); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.device-section ul { margin: 15px 0 15px 30px; color: var(--text-body); }
.device-section li { margin-bottom: 10px; }

.tip, .warning { padding: 20px; border-radius: var(--radius-sm); margin: 25px 0; }
.tip { background: #e8f5e9; border-left: 4px solid #4caf50; }
.warning { background: #fff3e0; border-left: 4px solid #ff9800; }
.tip-title, .warning-title { font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.tip .tip-title { color: #2e7d32; }
.warning .warning-title { color: #e65100; }
.tip p, .warning p { margin: 0; color: var(--text-body); }

/* ============================================
   DOWNLOAD VIEW
   ============================================ */
.download-page { padding: 60px 20px; max-width: 900px; margin: 0 auto; }
.app-preview { text-align: center; margin: 40px 0 30px; }
.app-preview img { max-width: 180px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.download-btn { display: inline-block; background: transparent; color: #fff; padding: 0; border-radius: 0; font-weight: 700; transition: transform var(--transition); }
.download-btn:hover { transform: scale(1.03); text-decoration: none; color: #fff; }
.download-btn img { height: 60px; vertical-align: middle; border-radius: 8px; }

.features-grid-alt { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 50px 0 40px; }
.feature-alt { padding: 30px 20px; background: var(--white); border-radius: var(--radius-md); text-align: center; box-shadow: var(--shadow-sm); border: 1px solid #eee; transition: all var(--transition); }
.feature-alt:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-alt-icon { font-size: 2.2rem; color: var(--primary-dark); margin-bottom: 15px; }
.feature-alt h3 { margin-bottom: 8px; font-size: 1.1rem; color: var(--text-dark); }
.feature-alt p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.5; }

.comparison-table { width: 100%; border-collapse: collapse; margin: 30px 0; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.comparison-table th, .comparison-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #eee; }
.comparison-table th { background: var(--bg-section); font-weight: 600; }
.check { color: #4caf50; font-weight: 700; }
.cross { color: #f44336; }

.web-version-box { background: #e3f2fd; padding: 30px; border-radius: var(--radius-md); margin: 30px 0; text-align: center; }
.web-version-box h3 { color: #1976d2; margin-bottom: 10px; }
.web-version-box p { color: var(--text-muted); margin-bottom: 20px; }
.btn-primary { display: inline-block; background: var(--primary-dark); color: var(--white); padding: 14px 30px; border-radius: var(--radius-lg); font-weight: 600; transition: background var(--transition); border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
.btn-primary:hover { background: #e91e63; color: var(--white); text-decoration: none; }

/* ============================================
   ABOUT VIEW
   ============================================ */
.about-page { padding: 60px 20px; max-width: 800px; margin: 0 auto; }
.about-page h2 { color: var(--primary-dark); margin: 40px 0 15px; font-size: 1.6rem; }
.about-page h3 { color: var(--text-dark); margin: 25px 0 10px; font-size: 1.2rem; }
.about-page p { color: var(--text-body); margin-bottom: 15px; }
.about-page ul { margin: 15px 0 15px 30px; color: var(--text-body); }
.about-page li { margin-bottom: 10px; }

/* ============================================
   CONTACT VIEW
   ============================================ */
.contact-page { padding: 60px 20px; max-width: 800px; margin: 0 auto; }
.contact-intro { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; }
.contact-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 30px 0; }
.contact-method { text-align: center; padding: 30px; border: 1px solid #eee; border-radius: var(--radius-md); transition: all var(--transition); background: var(--white); }
.contact-method:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.contact-method-icon { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 15px; }
.contact-method h3 { margin-bottom: 8px; }
.contact-method p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; }

.faq-section { margin: 40px 0; padding: 30px; background: var(--bg-section); border-radius: var(--radius-md); }
.faq-section h2 { color: var(--primary-dark); margin-bottom: 20px; }
.faq-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-question { font-weight: 600; color: var(--text-dark); margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { color: var(--text-muted); display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-question i { transition: transform var(--transition); }

.response-time { background: #e8f5e9; padding: 15px; border-radius: var(--radius-sm); margin-top: 20px; text-align: center; }
.response-time p { margin: 0; color: #2e7d32; font-weight: 500; }

/* ============================================
   PRIVACY VIEW
   ============================================ */
.privacy-page { padding: 60px 20px; max-width: 800px; margin: 0 auto; }
.privacy-page h2 { color: var(--primary-dark); margin: 30px 0 15px; font-size: 1.5rem; }
.privacy-page p { color: var(--text-body); margin-bottom: 15px; }
.privacy-page ul { margin: 15px 0 15px 30px; color: var(--text-body); }
.privacy-page li { margin-bottom: 10px; }
.last-updated { background: var(--bg-section); padding: 15px; border-radius: var(--radius-sm); margin-bottom: 30px; }
.last-updated p { margin: 0; font-size: 0.9rem; }

/* ============================================
   FOOTER
   ============================================ */
.app-footer { background: var(--primary); color: var(--white); padding: 30px 20px; margin-top: auto; }
.footer-container { max-width: var(--max-width); margin: 0 auto; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-bottom: 15px; }
.footer-nav a { color: rgba(255,255,255,0.85); font-weight: 500; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }
.footer-credit { font-size: 0.9rem; color: rgba(255,255,255,0.8); margin-top: 15px; }
.footer-credit a { color: var(--white); font-weight: 600; }
.donation-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.donate-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; transition: all var(--transition); text-decoration: none; }
.donate-usa { background: #635bff; color: var(--white); }
.donate-usa:hover { background: #4b43e8; transform: translateY(-2px); }
.donate-eu { background: #2a9d8f; color: var(--white); }
.donate-eu:hover { background: #21867a; transform: translateY(-2px); }
.donate-btn i { color: #ff6b9d; }

/* ============================================
   CTA BUTTONS
   ============================================ */
.cta-section { text-align: center; padding: 40px 0; }
.cta-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--primary-dark); color: var(--white); padding: 16px 36px; border-radius: var(--radius-lg); font-weight: 600; font-size: 1.1rem; transition: all var(--transition); border: none; cursor: pointer; font-family: inherit; }
.cta-btn:hover { background: #e91e63; transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); text-decoration: none; }
.cta-btn i { transition: transform var(--transition); }
.cta-btn:hover i { transform: translateX(4px); }

/* ============================================
   REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .vib-btn.active { animation: none; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: var(--header-height);
        left: 0; right: 0; background: var(--primary);
        flex-direction: column; padding: 10px 20px 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .main-nav.open { display: flex; }
    .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); }

    .hero { padding: 40px 15px 30px; }
    .vibrator-card { border-radius: 170px 170px 40px 40px; padding: 50px 20px 30px; }
    .features-overlay { padding: 40px 20px; }
    .features-grid { grid-template-columns: 1fr; gap: 30px; }
    .step { flex-direction: column; text-align: center; }
    .step-num { margin: 0 auto; }
    .contact-methods { grid-template-columns: 1fr; }
    .footer-nav { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .vib-btn { font-size: 1rem; padding: 14px 24px; }
    .pattern-grid { grid-template-columns: 1fr; }
}

/* ============================================
   HIGH CONTRAST
   ============================================ */
@media (prefers-contrast: high) {
    .vib-btn { border: 2px solid var(--text-dark); }
    .vib-btn.active { border-color: var(--primary-dark); }
    .pattern-card { border-width: 2px; }
    .contact-method { border-width: 2px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .app-header, .app-footer, .vibrator-card, .download-section, .menu-toggle { display: none; }
    .hero { min-height: auto; background: none; color: var(--text-dark); }
}
