/* ================================================================
   TENACITY – Propellant Batch Tracker
   style.css – Same design language as shorturl.html
   ================================================================ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
    --sidebar-bg: #132233;
    --text: #ffffff;
    --muted: #e2e8f0;
    --card: rgba(255, 255, 255, 0.15);
    --accent: #4da6ff;
    --section-title: #4da6ff;
    --success-color: #38c172;
    --error-color: #e3342f;
    --warning-color: #ffc107;
    --input-bg: rgba(255, 255, 255, 0.22);
    --input-border: rgba(255, 255, 255, 0.45);
    --input-focus-border: #4da6ff;
    --input-focus-bg: rgba(255, 255, 255, 0.32);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

/* ── Body + Background ─────────────────────────────────────────── */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../background.jpg') no-repeat center center / cover fixed;
    filter: brightness(50%);
    z-index: -1;
}

/* ── Stars ─────────────────────────────────────────────────────── */
.stars-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px #fff, 0 0 16px #fff;
    animation: fall linear infinite;
}

@keyframes fall {
    from {
        transform: translateY(-20px);
        opacity: 1;
    }

    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: var(--sidebar-bg);
    padding: 30px 20px;
    transition: left 0.3s;
    z-index: 2000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    padding: 14px 0;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: color 0.2s;
}

.sidebar a:hover {
    color: var(--accent);
}

.close-btn {
    display: block;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    text-align: right;
    margin-bottom: 20px;
}

.hamburger {
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

/* ── Header ────────────────────────────────────────────────────── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.left-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

header img {
    height: 60px;
    transition: 0.3s;
}

header .seds-logo {
    height: 70px;
}

/* ── Live Date/Time Bar ─────────────────────────────────────────── */
.datetime-bar {
    text-align: center;
    padding: 8px 20px;
    background: rgba(19, 34, 51, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(77, 166, 255, 0.3);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.5px;
}

/* ── Page Title ─────────────────────────────────────────────────── */
.events-title {
    margin-top: 8px;
    font-size: clamp(32px, 6vw, 60px);
    color: #fff;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(77, 166, 255, 0.6);
}

/* ── Section Card ───────────────────────────────────────────────── */
.section {
    margin: 35px auto;
    padding: 35px;
    max-width: 1140px;
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.section.show {
    opacity: 1;
    transform: translateY(0);
}

.section h1 {
    font-size: clamp(22px, 4vw, 30px);
    margin-bottom: 10px;
    text-align: center;
    color: var(--section-title);
    text-shadow: 0 0 8px rgba(77, 166, 255, 0.4);
}

.section p {
    font-size: 15px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 25px;
}

/* ── Output/Result Area (same as shorturl.html) ─────────────────── */
#output {
    margin: 0 0 25px;
    padding: 20px 25px;
    border-radius: 14px;
    border: 2px solid transparent;
    font-size: 16px;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
}

#output.success {
    background: rgba(56, 193, 114, 0.15);
    border-color: var(--success-color);
}

#output.error {
    background: rgba(227, 52, 47, 0.15);
    border-color: var(--error-color);
    color: var(--text);
}

#output.loading {
    background: var(--sidebar-bg);
    border-color: var(--warning-color);
    color: var(--text);
    font-weight: 700;
    overflow: hidden;
}

/* Loading elements (same as shorturl.html) */
#loadingArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.loading-message-box {
    background: #fff;
    color: #333;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(77, 166, 255, 0.4);
    transition: opacity 0.5s ease-in-out;
}

.loading-gif-container {
    width: 220px;
    height: 220px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s infinite alternate;
}

.loading-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

@keyframes pulse {
    from {
        transform: scale(0.93);
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    }

    to {
        transform: scale(1.0);
        box-shadow: 0 0 24px rgba(77, 166, 255, 0.7);
    }
}

/* ── Single-Column Form Layout ──────────────────────────────────── */
.main-form-grid {
    display: block;
    margin-top: 10px;
}

/* ── Form Panel ─────────────────────────────────────────────────── */
.form-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Form section headers (dividers) */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(77, 166, 255, 0.45);
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(77, 166, 255, 0.5);
}

.form-section-header:first-child {
    margin-top: 0;
}

/* Field group: label + input */
.field-group {
    margin-bottom: 16px;
}

.field-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.field-hint,
small.field-hint {
    display: block;
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
    margin-top: 5px;
}

/* Two-field row */
.field-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 500px) {
    .field-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ── Input / Select / Textarea ──────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 13px 15px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.25);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234da6ff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
}

select option {
    background: #132233;
    color: #fff;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Readonly fields */
.readonly-field {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--accent) !important;
    cursor: not-allowed;
    font-weight: 600;
    font-size: 13px;
}

.readonly-field:focus {
    box-shadow: none !important;
}

/* ── Chemical Row (name left + % right) ─────────────────────────── */
.chem-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
    margin-bottom: 14px;
    align-items: end;
}

@media (max-width: 480px) {
    .chem-row {
        grid-template-columns: 1fr;
    }
}

.chem-pct-group input {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.pct-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: -6px;
    margin-bottom: 12px;
    font-style: italic;
}

/* ── Toggle Buttons (Yes/No for catalyst) ───────────────────────── */
.toggle-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.toggle-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid var(--input-border);
    background: transparent;
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 4px 12px rgba(77, 166, 255, 0.4);
}

.toggle-btn.active-no {
    background: var(--error-color);
    border-color: var(--error-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(227, 52, 47, 0.4);
}

/* ── Percentage Mismatch Warning ────────────────────────────────── */
.pct-warning {
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ── Submit Button ──────────────────────────────────────────────── */
#submitBtn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

#submitBtn:hover:not(:disabled) {
    background: #a4ccff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(77, 166, 255, 0.45);
}

#submitBtn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

/* ── Live Preview Card ──────────────────────────────────────────── */
.preview-panel {
    position: relative;
}

.preview-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(77, 166, 255, 0.3);
    border-radius: 18px;
    padding: 24px;
    position: sticky;
    top: 90px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(77, 166, 255, 0.25);
}

.preview-header h3 {
    font-size: 16px;
    color: var(--accent);
    font-weight: 700;
}

.preview-badge {
    background: rgba(77, 166, 255, 0.15);
    border: 1px solid rgba(77, 166, 255, 0.4);
    color: var(--accent);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Percentage sum bar */
.preview-pct-sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

#pctSumValue.pct-ok {
    color: var(--success-color);
}

#pctSumValue.pct-warn {
    color: var(--warning-color);
}

#pctSumValue.pct-err {
    color: var(--error-color);
}

/* Preview rows table */
.preview-chemicals {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.preview-row {
    display: grid;
    grid-template-columns: 1fr 55px 70px;
    gap: 6px;
    align-items: center;
    padding: 9px 8px;
    border-radius: 8px;
    font-size: 13px;
    transition: background 0.2s;
}

.preview-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.preview-header-row {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.prev-chem-name {
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
    line-height: 1.3;
}

.prev-chem-pct {
    text-align: center;
    font-weight: 700;
    color: var(--accent);
}

.prev-chem-grams {
    text-align: right;
    font-weight: 700;
    color: var(--success-color);
}

.catalyst-row .prev-chem-name {
    color: #ff9f43;
}

.catalyst-row .prev-chem-grams {
    color: #ff9f43;
}

.preview-total-row {
    display: grid;
    grid-template-columns: 1fr 55px 70px;
    gap: 6px;
    align-items: center;
    padding: 10px 8px;
    border-top: 2px solid rgba(77, 166, 255, 0.3);
    margin-top: 4px;
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
}

.prev-total-grams {
    text-align: right;
    color: #fff;
}

/* Info chips */
.preview-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.info-chip {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 14px;
    flex: 1;
    min-width: 90px;
}

.chip-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

.chip-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    word-break: break-all;
}

/* Placeholder */
.preview-placeholder {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 20px 10px;
    line-height: 1.6;
    font-style: italic;
}

/* ── History Section ────────────────────────────────────────────── */
.history-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.history-controls select {
    flex: 1;
    min-width: 200px;
}

.history-controls button {
    padding: 13px 20px;
    border-radius: 10px;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.history-controls button:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 4px 12px rgba(77, 166, 255, 0.35);
}

.history-loading {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-style: italic;
}

/* History display card */
.history-card {
    background: rgba(19, 34, 51, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(77, 166, 255, 0.35);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: fadeIn 0.4s ease-out;
}

.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(77, 166, 255, 0.2);
}

.history-edit-toggle-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: rgba(77, 166, 255, 0.12);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.history-edit-toggle-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 12px rgba(77, 166, 255, 0.4);
}

.history-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.history-card-id {
    font-size: 13px;
    color: var(--muted);
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.status-success {
    background: rgba(56, 193, 114, 0.15);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-failure {
    background: rgba(227, 52, 47, 0.15);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.status-ok {
    background: rgba(77, 166, 255, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* History data grid */
.history-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.history-data-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 14px;
}

.history-data-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 4px;
}

.history-data-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

/* Chemical breakdown table in history */
.history-chem-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.history-chem-table th {
    background: rgba(77, 166, 255, 0.12);
    color: var(--accent);
    padding: 9px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.history-chem-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.history-chem-table tr:last-child td {
    border-bottom: none;
}

.history-chem-table .total-row td {
    font-weight: 800;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid rgba(77, 166, 255, 0.3);
}

/* Status update form in history */
.status-update-form {
    background: rgba(19, 34, 51, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(77, 166, 255, 0.35);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-top: 24px;
}

.status-update-form h4 {
    font-size: 15px;
    color: var(--accent);
    margin-bottom: 14px;
}

.status-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.status-opt-btn {
    padding: 9px 18px;
    border-radius: 8px;
    border: 2px solid;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
}

.status-opt-btn.opt-success {
    border-color: var(--success-color);
    color: var(--success-color);
}

.status-opt-btn.opt-success.selected {
    background: var(--success-color);
    color: #fff;
}

.status-opt-btn.opt-failure {
    border-color: var(--error-color);
    color: var(--error-color);
}

.status-opt-btn.opt-failure.selected {
    background: var(--error-color);
    color: #fff;
}

.status-opt-btn.opt-ok {
    border-color: var(--accent);
    color: var(--accent);
}

.status-opt-btn.opt-ok.selected {
    background: var(--accent);
    color: #000;
}

.status-submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--success-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.status-submit-btn:hover:not(:disabled) {
    background: #2e8b57;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 193, 114, 0.4);
}

.status-submit-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

/* ── Contact Section (same as shorturl.html) ────────────────────── */
.contact {
    background: var(--sidebar-bg);
    padding: 40px 25px;
    text-align: center;
    border-radius: 16px;
    margin: 35px auto;
    max-width: 1100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.contact-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-item {
    text-align: center;
    max-width: 220px;
}

.contact-item img {
    width: 30px;
    margin-bottom: 8px;
    transition: transform 0.3s;
}

.contact-item p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.contact-item a,
.social-item a {
    text-decoration: none;
    color: inherit;
}

.socials {
    margin-top: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.social-item {
    text-align: center;
}

.social-item img {
    width: 40px;
    margin: 0 auto 5px;
    display: block;
    transition: transform 0.3s;
}

.social-item p {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

/* ── Loading UI matching shorturl.html ───────────────────────────── */
#btnLoadingArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    width: 100%;
}

#conversionDisplay {
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.loading-message-box {
    background-color: #fff;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 0 18px rgba(77, 166, 255, 0.5);
    transition: opacity 0.5s ease-in-out;
}

.loading-gif-container {
    width: 260px;
    height: 260px;
    background-color: #fff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    box-shadow: 0 0 20px rgba(77, 166, 255, 0.6);
    padding: 6px;
    animation: pulse 1.5s infinite alternate;
}

.loading-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

@keyframes pulse {
    from {
        transform: scale(0.95);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    }

    to {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(77, 166, 255, 0.8);
    }
}

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── EDIT MODAL POPUP ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: #0f1c2b;
    border: 1px solid rgba(77, 166, 255, 0.4);
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(77, 166, 255, 0.25);
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: rgba(77, 166, 255, 0.08);
    border-bottom: 1px solid rgba(77, 166, 255, 0.2);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--accent);
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.modal-cancel-btn {
    padding: 11px 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-save-btn {
    padding: 11px 24px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
}

.modal-save-btn:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 4px 16px rgba(77, 166, 255, 0.4);
}

.modal-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── PHOTO CARD, BIG SQUARE DROP ZONE & VIEW PHOTO BUTTON ──────── */
.photo-card {
    background: rgba(19, 34, 51, 0.65);
    border: 1px solid rgba(77, 166, 255, 0.25);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.photo-card:hover {
    border-color: rgba(77, 166, 255, 0.45);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.camera-action-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
}

.primary-camera-btn {
    border: 1.5px solid var(--accent);
    background: rgba(77, 166, 255, 0.12);
    color: var(--accent);
}

.primary-camera-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 4px 16px rgba(77, 166, 255, 0.4);
    transform: translateY(-1px);
}

.secondary-camera-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.secondary-camera-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.photo-drop-zone {
    border: 2px dashed rgba(77, 166, 255, 0.35);
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.25s ease-in-out;
}

.photo-drop-zone.big-square {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.photo-drop-zone .drop-zone-icon {
    font-size: 38px;
    margin-bottom: 2px;
    transition: transform 0.25s;
}

.photo-drop-zone:hover .drop-zone-icon,
.photo-drop-zone.drag-over .drop-zone-icon {
    transform: scale(1.15) translateY(-3px);
}

.photo-drop-zone .drop-zone-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.photo-drop-zone .drop-zone-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.photo-drop-zone:hover,
.photo-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(77, 166, 255, 0.08);
    box-shadow: 0 0 20px rgba(77, 166, 255, 0.2);
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.gallery-item-card {
    position: relative;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(77, 166, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, border-color 0.2s;
}

.gallery-item-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.gallery-item-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-card .remove-item-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: background 0.2s;
}

.gallery-item-card .remove-item-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.gallery-item-card .gallery-item-index {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(77, 166, 255, 0.3);
}

.view-photo-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--success-color);
    background: rgba(56, 193, 114, 0.15);
    color: var(--success-color);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s;
}

.view-photo-btn:hover {
    background: var(--success-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 193, 114, 0.4);
}

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}
