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

:root {
    --primary: #2d5016;
    --primary-light: #4a7c1a;
    --secondary: #ffd700;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #f8f8f8;
    --border: #ddd;
    --success: #22c55e;
    --warning: #ef4444;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.app-title {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.header-icons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon:active {
    background: rgba(255,255,255,0.3);
}

.tier-badge {
    font-size: 0.75rem;
    font-weight: bold;
    background: var(--secondary);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* SEARCH SECTION */
.search-section {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.search-section.hidden {
    display: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-results {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem;
    background: var(--bg);
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    border-left: 4px solid var(--primary);
}

.search-result-item:active {
    background: #e8e8e8;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

.hidden {
    display: none !important;
}

/* WELCOME SCREEN */
.welcome-screen {
    padding: 2rem 1rem;
}

.welcome-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.3;
}

.tagline {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-primary, .btn-secondary, .btn-buy, .btn-payment, .btn-donation, .btn-business {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

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

.btn-primary:active {
    background: var(--primary-light);
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:active {
    background: #f0f0f0;
}

.btn-buy {
    background: var(--success);
    color: white;
    margin-top: 1rem;
}

.btn-buy.lifetime {
    background: var(--secondary);
    color: var(--primary);
    font-weight: bold;
}

.btn-payment, .btn-donation, .btn-business {
    background: var(--primary);
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
}

.featured-drugs {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.featured-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.drug-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:active {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* DRUG DETAILS */
.drug-details {
    padding: 1rem;
}

.back-button {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
}

.drug-header {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 6px solid var(--primary);
}

.drug-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.drug-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.drug-dosage {
    background: var(--bg);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.drug-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.drug-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.herb-card {
    background: var(--bg);
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
}

.herb-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.herb-detail {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

/* COMPETITOR SECTION */
.competitor-section {
    padding: 1rem;
    margin: 1rem 0;
}

.btn-toggle {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.competitor-content {
    margin-top: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
}

.competitor-content.hidden {
    display: none;
}

.competitor-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.competitor-item:last-child {
    border-bottom: none;
}

.competitor-name {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.advantage {
    background: #e8f5e9;
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* EXTRACTION METHODS */
.extraction-guide {
    padding: 1.5rem 1rem;
    background: white;
    margin: 1rem 0;
    border-radius: var(--radius);
}

.extraction-guide h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.method-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.method-card {
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.method-name {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.method-detail {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

.kangen-banner {
    background: linear-gradient(135deg, #e8f5e9 0%, #f0f9ff 100%);
    border: 2px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.kangen-banner p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

/* TIER CARDS */
.tier-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.tier-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
}

.tier-card.featured {
    border: 3px solid var(--primary);
    background: #f9f9f9;
}

.badge {
    position: absolute;
    top: -12px;
    left: 1rem;
    background: var(--secondary);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.tier-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.oldprice {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.tier-card ul {
    list-style: none;
    margin: 1rem 0;
}

.tier-card li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* FOOTER */
.footer {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.modal-content ol, .modal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* INSTALL BANNER */
.install-banner {
    background: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.install-banner p {
    flex: 1;
    margin: 0;
}

.btn-install {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: var(--primary);
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

/* RESPONSIVE */
@media (min-width: 600px) {
    .tier-cards {
        grid-template-columns: 1fr 1fr;
    }

    .payment-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* SCROLLBAR STYLING */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* PRINT STYLES */
@media print {
    .header, .footer, .cta-buttons, .payment-section {
        display: none;
    }
}
