* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #d4e2ec;
    line-height: 1.5;
    min-height: 100vh;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
/* ========== RESPONSIVE HEADER FIXES ========== */

/* For tablets and smaller laptops */
@media (max-width: 768px) {
    header {
        padding: 0.4rem 1rem;
        gap: 0.3rem;
    }
    .logo-img {
        height: 70px;
        max-width: 100%;
    }
    .emergency-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* For phones */
@media (max-width: 480px) {
    header {
        padding: 0.3rem 0.6rem;
        gap: 0.2rem;
        flex-wrap: wrap;
    }
    .logo-img {
        height: 50px;
        max-width: 100%;
    }
    .emergency-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.6rem;
        border-radius: 40px;
    }
}

/* For very small phones */
@media (max-width: 360px) {
    header {
        padding: 0.2rem 0.4rem;
        flex-direction: column;
        align-items: center;
    }
    .logo-img {
        height: 45px;
    }
    .emergency-btn {
        font-size: 0.55rem;
        padding: 0.2rem 0.5rem;
    }
}
header {
    background: #ffffff;
    padding: 0.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #2c6e6b;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
}

.emergency-btn {
    background-color: #c62828;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 48px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

main {
    flex: 1;
    padding: 1.2rem;
    background: #ffffff;
}

/* Landing / Welcome Screen */
.landing-container, .welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.welcome-title {
    font-size: 1.4rem;
    color: #2c6e6b;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.explanation-box {
    background: #eef4f8;
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    border-left: 5px solid #2c6e6b;
}

.explanation-box p {
    margin-bottom: 1rem;
    color: #1a4e4b;
    line-height: 1.5;
}

.explanation-box strong {
    color: #2c6e6b;
}

.steps-list {
    margin: 1rem 0 0 1.2rem;
}

.steps-list li {
    margin: 0.5rem 0;
    color: #1a4e4b;
}

.start-btn {
    background: #2c6e6b;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
}

/* Category Groups */
.category-group {
    margin-bottom: 1.5rem;
    border-radius: 20px;
    padding: 0.8rem 0.8rem 0.2rem 0.8rem;
}

.danger-group {
    background: #fff4f2;
    border-left: 4px solid #c62828;
}

.daily-group {
    background: #eff7f0;
    border-left: 4px solid #2c6e6b;
}

.comm-group {
    background: #f3eff8;
    border-left: 4px solid #7b5c9e;
}

.group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    margin-bottom: 0.8rem;
    padding-left: 0.3rem;
}

.group-title.danger {
    color: #b33a2e;
}

.group-title.daily {
    color: #2c6e6b;
}

.group-title.communicate {
    color: #7b5c9e;
}

.category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.category-btn {
    background: white;
    border: 1.5px solid #cbdde3;
    padding: 0.8rem 0.3rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 60px;
    color: #1c5a62;
    cursor: pointer;
}

/* Node Screen */
.back-btn {
    background: #cde3e8;
    color: #1a5c58;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.2rem;
    display: inline-block;
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0.25rem 0 0.8rem 0;
    color: #1a4e4b;
}

.warning-card {
    background: #fbe9e7;
    border-left: 5px solid #c62828;
    padding: 0.9rem;
    border-radius: 20px;
    margin-bottom: 1.2rem;
}

.warning-card p {
    font-weight: 800;
    color: #a02f2f;
    font-size: 0.9rem;
}

.collapsible-section {
    margin-bottom: 1.2rem;
    border-radius: 20px;
    overflow: hidden;
}

.section-preview {
    font-size: 0.9rem;
    line-height: 1.45;
    background: #f0f5f8;
    padding: 0.9rem;
    color: #1e5b61;
}

.section-full {
    display: none;
    background: #f0f5f8;
    padding: 0.9rem;
    color: #1e5b61;
    font-size: 0.9rem;
    line-height: 1.45;
    border-top: 1px solid #c8dae2;
}

.action-card {
    background: #f9fdfb;
    border-left: 5px solid #2c6e6b;
    padding: 0.9rem;
    border-radius: 20px;
    margin-bottom: 1.2rem;
}

.action-card h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.check-icon, .cross-icon {
    font-size: 1.5rem;
    margin-right: 6px;
    vertical-align: middle;
}

.action-list {
    list-style: none;
    padding-left: 0;
}

.action-list li {
    font-size: 0.9rem;
    padding: 0.35rem 0 0.35rem 1.3rem;
    position: relative;
    line-height: 1.4;
}

.action-list li::before {
    content: "●";
    color: #2c6e6b;
    position: absolute;
    left: 0;
    font-size: 0.7rem;
}

.read-more-global-btn {
    background: none;
    border: none;
    color: #2c6e6b;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem;
    display: block;
    text-align: center;
    width: 100%;
    background: #eef4f8;
    border-radius: 40px;
    text-decoration: none;
}

footer {
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: #ffffff;
    border-top: 2px solid #c0d4de;
    flex-wrap: wrap;
}

.nav-btn {
    flex: 1;
    background: #e0edf0;
    border: none;
    padding: 0.7rem 0.3rem;
    border-radius: 48px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a5c58;
    cursor: pointer;
    text-align: center;
    min-width: 100px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    width: 85%;
    max-width: 500px;
}

.close {
    float: right;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
}

.emergency-modal-btn {
    background: #2c6e6b;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 48px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

.setup-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #2c6e6b;
    overflow-y: auto;
}

.setup-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    border-radius: 32px;
    padding: 1.8rem;
}

.setup-screen {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.setup-screen input {
    padding: 0.7rem;
    font-size: 0.9rem;
    border: 1px solid #cbdbe0;
    border-radius: 60px;
    width: 100%;
}

.setup-screen button {
    background: #2c6e6b;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.helper-text {
    font-size: 0.8rem;
    color: #5f7e85;
    margin-top: -0.3rem;
}

/* Resources page */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-card {
    background: #eef4f8;
    border-radius: 20px;
    padding: 1rem;
    border-left: 4px solid #2c6e6b;
}

.resource-card h3 {
    color: #1a4e4b;
    margin-bottom: 0.5rem;
}

.resource-card .status-free {
    color: #2c6e6b;
    font-weight: bold;
}

.resource-card .status-paid {
    color: #c62828;
    font-weight: bold;
}

.resource-btn {
    display: inline-block;
    background: #2c6e6b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 48px;
    text-decoration: none;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.paywall-note {
    background: #fff0db;
    border-radius: 20px;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: center;
    color: #b45f06;
}

/* Paywall gate */
.paywall-container {
    text-align: center;
    padding: 2rem 1rem;
}

.paywall-input {
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #cbdde3;
    border-radius: 48px;
    width: 100%;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 480px) {
    main { padding: 1rem; }
    .category-btn { font-size: 0.75rem; padding: 0.6rem 0.2rem; }
    .logo-img { height: 60px; }
    .emergency-btn { padding: 0.4rem 0.7rem; font-size: 0.7rem; }
    .nav-btn { font-size: 0.65rem; padding: 0.6rem 0.2rem; min-width: 80px; }
    footer { gap: 0.4rem; }
}/* ========== LANDING PAGE SPECIFIC ========== */
.landing-page {
    background: #ffffff;
}

.landing-header {
    padding: 2rem 1rem 0.5rem 1rem;
    justify-content: center;
    border-bottom: none;
}

.landing-logo {
    height: 100px !important;
    width: auto;
}

.landing-main {
    padding: 0 1.5rem 2rem 1.5rem;
}

.landing-title {
    font-size: 1.8rem;
    color: #2c6e6b;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.landing-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #1a4e4b;
    margin-bottom: 1.5rem;
}

.landing-box {
    margin-bottom: 1.5rem;
}

.install-instructions {
    background: #eef4f8;
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 2rem;
}

.install-instructions p {
    margin-bottom: 0.8rem;
    color: #1a4e4b;
    font-weight: 600;
}

.install-instructions ul {
    margin-left: 1.5rem;
    color: #1a4e4b;
}

.install-instructions li {
    margin: 0.5rem 0;
}

.landing-launch-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem;
}

/* ========== APP PAGE – LARGER LOGO ON WELCOME SCREEN ========== */
.app-container .logo-img {
    height: 100px;
    transition: height 0.2s ease;
}

/* Larger logo on welcome screen only */
.welcome-container .logo-img {
    height: 160px;
    margin-bottom: 1rem;
}

/* ========== RESOURCES PAGE UPDATES ========== */
.resource-card .status-free {
    display: none;
}

.resource-card .status-paid {
    color: #b45f06;
    font-weight: bold;
}

.paywall-note {
    display: none;
}

/* ========== NAVIGATION FIXES ========== */
.back-to-categories-btn {
    background: #cde3e8;
    color: #1a5c58;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.2rem;
    display: inline-block;
}/* ========== DONATION & EMAIL SIGNUP SECTIONS ========== */
.future-resources, .donation-section, .email-signup {
    background: #eef4f8;
    border-radius: 20px;
    padding: 1.2rem;
    margin-top: 1.5rem;
}

.future-resources h3, .donation-section h3, .email-signup h3 {
    color: #1a4e4b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.donation-btn {
    display: inline-block;
    background: #2c6e6b;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 48px;
    text-decoration: none;
    margin: 0.8rem 0 0.5rem 0;
    font-weight: 600;
}

.donation-placeholder-note, .email-placeholder-note {
    font-size: 0.75rem;
    color: #5f7e85;
    margin-top: 0.5rem;
    font-style: italic;
}

.email-signup form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.email-signup input {
    padding: 0.7rem;
    border: 1px solid #cbdde3;
    border-radius: 48px;
    font-size: 0.9rem;
    width: 100%;
}

.email-signup button {
    background: #2c6e6b;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 48px;
    cursor: pointer;
    font-weight: 600;
}/* ========== DANGER TRIANGLE PULSING ANIMATION ========== */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.danger-triangle {
    animation: pulse 1.2s ease-in-out infinite;
}

/* Optional: reduce motion for users who prefer no animation */
@media (prefers-reduced-motion: reduce) {
    .danger-triangle {
        animation: none;
    }
}
/* Instruction note on categories page */
.instruction-note {
    background: #eef4f8;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #1a4e4b;
    border-left: 3px solid #2c6e6b;
}

.instruction-note p {
    margin: 0;
    line-height: 1.5;
}