body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    max-width: 920px;
    margin: auto;
    padding: 20px;
    background: radial-gradient(circle at top, #b3d4ff 0%, #e7f4ff 40%, #f8fbff 100%);
    color: #1f2937;
    transition: background 0.35s ease, color 0.35s ease;
}

body.dark {
    background: radial-gradient(circle at top, #1d1d2a 0%, #11141f 50%, #0b0d14 100%);
    color: #e5e7eb;
}

header {
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #30cfd0, #330867);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(49, 67, 110, 0.24);
    color: #fff;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 6px auto 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
}

.header-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

#toggleDark,
#copyLink {
    padding: 8px 14px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

#toggleDark:hover,
#copyLink:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

nav {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 22px;
}

nav a {
    text-decoration: none;
    color: #0f4e92;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: 8px;
}

nav a:hover {
    background: rgba(243, 247, 255, 0.95);
    color: #1f487a;
}

section {
    background: #ffffff;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(46, 68, 100, 0.1);
}

body.dark section {
    background: #1f2431;
    border-color: #2f3343;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

form input,
#searchInput,
#helperMessage {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.dark form input,
body.dark #searchInput,
body.dark #helperMessage {
    background: #222734;
    color: #e2e8f0;
    border: 1px solid #4b5563;
}

form input:focus,
#searchInput:focus,
#helperMessage:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button,
.helpBtn,
.deleteBtn,
#sendHelp {
    font-weight: 700;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button,
#sendHelp {
    padding: 11px 18px;
    background: linear-gradient(140deg, #2563eb, #0ea5e9);
    color: #fff;
}

button:hover,
#sendHelp:hover,
.helpBtn:hover,
.deleteBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(35, 75, 165, 0.28);
}

.helpBtn {
    background: #10b981;
    color: #fff;
    border: 1px solid #0f766e;
}

.deleteBtn {
    background: #ef4444;
    color: #fff;
    border: 1px solid #b91c1c;
    margin-left: 8px;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.need {
    border: none;
    padding: 14px;
    margin-top: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    animation: fadeIn 0.3s ease-in-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.need:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(60, 92, 124, 0.18);
}

body.dark .need {
    background: #2a2f40;
}

.need strong {
    color: #1e293b;
}

body.dark .need strong {
    color: #d1d5db;
}

.highlight {
    background: rgba(255, 221, 51, 0.35);
    border-radius: 4px;
    padding: 2px 4px;
}

.success {
    color: #16a34a;
    display: none;
    font-size: 0.92em;
    margin-top: 8px;
}

footer {
    text-align: center;
    font-size: 0.84em;
    color: #4b5563;
    margin-top: 18px;
}

body.dark footer {
    color: #9ca3af;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 17, 30, 0.64);
}

.popup-content {
    background: #ffffff;
    width: min(420px, 92%);
    margin: 70px auto;
    padding: 22px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(19, 46, 102, 0.3);
}

body.dark .popup-content {
    background: #0f172a;
    color: #e2e8f0;
}

#closePopup {
    position: absolute;
    right: 12px;
    top: 10px;
    cursor: pointer;
    font-size: 22px;
    color: #6b7280;
}

#closePopup:hover {
    color: #111827;
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .popup-content {
        width: 95%;
        margin-top: 48px;
    }
}