:root {
    --primary-color: #128C7E;
    --primary-dark: #075E54;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #111b21;
    --text-muted: #667781;
    --border-color: #d1d7db;
    --border-radius: 12px;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 { font-size: 1.25rem; }

.icon-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

main {
    flex: 1;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.install-banner {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.banner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #2e7d32;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0 0 0 10px;
}

.btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); }
.btn-secondary { background-color: white; color: #2e7d32; border: 1px solid #2e7d32; }

.message-form label {
    display: block;
    margin: 0 0 0.5rem;
    font-weight: 500;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

input[type="text"], input[type="tel"] {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.input-prefix {
    flex: 0 0 4.2rem;
    max-width: 4.2rem;
    text-align: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.input-phone {
    flex: 1 1 auto;
    min-width: 0;
}

.paste-btn {
    flex: 0 0 auto;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 10px;
    color: var(--text-muted);
}
.paste-btn:hover { background-color: #e2e6ea; }

.message-form .btn-primary { margin-top: 1.5rem; }

@media (max-width: 360px) {
    .input-prefix { flex-basis: 3.6rem; max-width: 3.6rem; padding-left: 0.15rem; padding-right: 0.15rem; }
    input[type="text"], input[type="tel"] { padding: 0.75rem 0.4rem; font-size: 0.95rem; }
}

footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
footer a { color: var(--primary-color); text-decoration: none; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
}
.modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg); width: 90%; max-width: 500px;
    border-radius: var(--border-radius);
    z-index: 100;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; background: var(--card-bg);
}
.modal-body { padding: 1.5rem; font-size: 0.95rem; line-height: 1.5; }
.modal-body h3 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
.modal-body ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.modal-body hr { border: 0; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }
.disclaimer { font-size: 0.85rem; color: #d32f2f; margin-bottom: 1rem; }
.ai-note { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }
.about-author-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.about-author-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.about-author-link { margin-bottom: 1rem; }
.version, .copyright { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }

.hidden { display: none !important; }
