*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Teardown‑inspired palette: concrete, muted blue, construction yellow */
:root {
    --bg: #d4d7dc;
    --bg-alt: #c2c5cc;
    --primary: #f6c744; /* yellow */
    --primary-dark: #d59b12;
    --accent: #3e5874; /* muted blue/steel */
    --danger: #c7483f;
    --text: #22252a;
    --muted: #5c6470;
    --border: #a9afb8;
    --card-radius: 6px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
    --transition-fast: 0.15s ease-out;
    --transition-med: 0.22s ease-out;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background:
        linear-gradient(135deg, #edeff2 0%, #cfd3da 35%, #bcc0c7 70%, #aeb3bb 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header – flat bar with construction accent strip */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f2f4f7;
    border-bottom: 2px solid #b2b7c0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.app-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background:
        repeating-linear-gradient(
            -45deg,
            #f6c744,
            #f6c744 8px,
            #22252a 8px,
            #22252a 14px
        );
    border: 2px solid #22252a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    color: #f2f4f7;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.brand-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-main {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #22252a;
}

.brand-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.app-nav a {
    color: #1f2933;
    text-decoration: none;
    font-weight: 600;
}

.app-nav a:hover {
    text-decoration: underline;
}

/* Buttons – blocky, construction feel */
.btn {
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #111827;
    color: #111827;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 3px 0 #111827;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn span.icon {
    font-size: 14px;
}

.btn:hover {
    background: #ffd864;
    transform: translateY(1px);
    box-shadow: 0 1px 0 #111827;
}

.btn-secondary {
    background: #e1e4ea;
    color: #111827;
    border-color: #3e4c59;
    box-shadow: 0 2px 0 #3e4c59;
}

.btn-secondary:hover {
    background: #f0f2f6;
}

/* Layout */
.app-main {
    flex: 1;
    max-width: 1080px;
    margin: 18px auto 28px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(250px, 1.3fr);
    gap: 22px;
}

/* Stack sidebar under main content on tablets/phones instead of right side */
@media (max-width: 1024px) {
    .app-main {
        grid-template-columns: 1fr;
        padding: 0 14px;
        margin-top: 10px;
        gap: 16px;
    }

    .card,
    .sidebar-card {
        padding: 12px 12px 10px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    }

    .brand-main {
        font-size: 16px;
        letter-spacing: 0.08em;
    }

    .brand-sub {
        font-size: 10px;
    }

    .app-header-inner {
        padding-inline: 14px;
    }
}

@media (max-width: 520px) {
    .app-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    body {
        font-size: 14px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-subtitle {
        font-size: 10px;
    }

    .activity-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .like-form {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .like-form input[type="text"] {
        width: 100%;
    }

    .btn,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .sidebar-card {
        padding-inline: 10px;
    }

    .activity-media {
        aspect-ratio: 16 / 10;
    }
}

/* Cards – flat concrete panels */
.card {
    background: #f5f6f8;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 16px 16px 14px;
    position: relative;
}

.card-inner {
    position: relative;
    z-index: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111827;
}

.card-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1px solid #111827;
    color: #111827;
    background: #f6c744;
}

/* Activity list */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-card {
    background: #e6e8ec;
    border-radius: 4px;
    border: 1px solid #b2b7c0;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.activity-title {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.activity-body {
    font-size: 13px;
    color: #1f2933;
}

.activity-media {
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #9fa4ad;
    margin-top: 4px;
    background: #000;
    /* Maintain a nice 16:9 preview ratio while staying responsive */
    aspect-ratio: 16 / 9;
}

.activity-media img,
.activity-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.activity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.likes-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
}

.like-pill {
    padding: 2px 8px;
    border-radius: 3px;
    background: #d3d7de;
    border: 1px solid #9fa4ad;
    color: #111827;
}

.like-pill span {
    font-weight: 600;
}

/* Inline like form */
.like-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px 2px 8px;
    border-radius: 4px;
    background: #f5f6f8;
    border: 1px solid #b2b7c0;
}

.like-form input[type="text"] {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 12px;
    width: 120px;
}

.like-form input::placeholder {
    color: #8a909b;
}

.like-form button {
    border: none;
    outline: none;
    cursor: pointer;
    background: #f6c744;
    color: #111827;
    border-radius: 3px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.like-form button:hover {
    background: #ffd864;
}

/* Forms + inputs */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.input,
.select,
.textarea {
    border-radius: 3px;
    border: 1px solid #a0a5ae;
    background: #f8fafc;
    color: var(--text);
    padding: 7px 9px;
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(62, 88, 116, 0.5);
    background: #ffffff;
}

.textarea {
    resize: vertical;
    min-height: 60px;
}

/* Sidebar */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-card {
    background: #f3f4f6;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 12px 12px 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #111827;
    margin-bottom: 4px;
}

.sidebar-note {
    font-size: 11px;
    color: var(--muted);
}

.friend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.friend-pill {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    background: #e0e3ea;
    border: 1px solid #9fa4ad;
    color: #111827;
}

/* Alerts */
.alert {
    border-radius: 3px;
    padding: 7px 9px;
    font-size: 12px;
    margin-bottom: 8px;
}

.alert-success {
    background: #d7f0ce;
    border: 1px solid #7fb46c;
    color: #234c1f;
}

.alert-error {
    background: #f7d4d0;
    border: 1px solid #c7483f;
    color: #7a231e;
}

/* Utilities */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

small {
    font-size: 11px;
    color: var(--muted);
}


