/* Font Imports */
@font-face {
    font-family: sohne;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: sohne;
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: sohne;
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: source-serif-pro;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Base Reset */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

:root {
    --utility-gray-800: 0 0% 20%;
    --utility-gray-500: 0 0% 50%;
    --primary-bg: hsl(24 12% 8%);
    --accent-color: hsl(44 93% 47%);
    --text-white: #ffffff;
    --text-heading-gradient: linear-gradient(180deg, hsl(var(--utility-gray-800)) 0%, hsl(var(--utility-gray-500)) 100%);
}

body {
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    color: var(--text-white);
    font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--primary-bg);
}

h1, h2, h3, h4, h5, h6, p, figure, pre {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

img, svg {
    vertical-align: middle;
}

/* Header */
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 500;
    background-color: var(--primary-bg);
    border-bottom: 1px solid hsl(0 0% 20%);
}

.header-content {
    padding: 0 24px;
    height: 57px;
    display: flex;
    align-items: center;
}

/* Content Wrapper - Uses flex centering like original */
.content-wrapper {
    display: flex;
    justify-content: center;
}

.content-inner {
    /* margin-top: 48px; */
    margin-bottom: 16px;
}

article {
    display: flex;
    justify-content: center;
}

/* Max Width Container - This gets the responsive margins */
.max-width-container {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    margin: 0 24px; /* Default: 24px on mobile */
}

/* Typography */
.post-title {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 42px;
    line-height: 1.23;
    letter-spacing: 0;
    color: var(--text-white); /* Fallback for browsers that don't support gradient text */
    background: var(--text-heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-body {
    font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
    line-height: 1.58;
    letter-spacing: -0.004em;
    font-size: 20px;
    color: var(--text-white);
}

.post-body p {
    word-break: break-word;
}

/* Author Section */
.author-section {
    display: flex;
    align-items: center;
}

.author-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.author-info {
    margin-left: 12px;
}

.author-name {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-white);
}

.post-meta {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: hsl(0 0% 60%);
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0 0;
    padding: 3px 8px;
    border-top: 1px solid hsl(0 0% 20%);
    border-bottom: 1px solid hsl(0 0% 20%);
}

.action-left,
.action-right {
    display: flex;
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.action-button svg {
    fill: hsl(0 0% 60%);
    width: 24px;
    height: 24px;
}

.action-button:hover svg {
    fill: var(--accent-color);
}

.action-left .action-button {
    margin-right: 24px;
}

.action-count {
    margin-left: 4px;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: hsl(0 0% 60%);
}

/* Images */
.paragraph-image {
    margin: 56px auto;
    max-width: 1920px;
}

.paragraph-image img {
    width: 100%;
    height: auto;
}

/* Video */
video {
    width: 100%;
    height: auto;
    margin-top: 30px;
}

/* Crypto Links */
.crypto-link h1,
.crypto-link h2 {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
}

.crypto-link:hover h1,
.crypto-link:hover h2 {
    color: hsl(44 93% 40%);
}

/* Applause Section */
.applause-section {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.applause-text {
    width: 100%;
    max-width: 680px;
    margin: 0 24px;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-white);
}

/* Footer */
.post-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 44px;
}

.footer-content {
    width: 100%;
    max-width: 680px;
    margin: 0 24px;
}

.post-footer .actions-bar {
    border: none;
    margin: 0;
    padding: 0;
}

/* Comments */
.comments-section {
    width: 100%;
    max-width: 680px;
    margin: 0 24px;
    padding: 24px;
}

.comments-title {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: var(--text-white); /* Fallback for browsers that don't support gradient text */
    background: var(--text-heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.comment-input-wrapper {
    margin-bottom: 20px;
}

.comment-input {
    width: 100%;
    padding: 20px;
    border: 1px solid hsl(0 0% 20%);
    border-radius: 4px;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: var(--primary-bg);
    color: var(--text-white);
}

.comment-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comment-input::placeholder {
    color: hsl(0 0% 60%);
}

.comment-name-input {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid hsl(0 0% 20%);
    background: transparent;
    color: var(--text-white);
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    outline: none;
    margin-bottom: 10px;
}

.comment-name-input:focus {
    border-bottom-color: var(--accent-color);
}

.comment-name-input::placeholder {
    color: hsl(0 0% 60%);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
}

.send-button {
    cursor: pointer;
    margin: 10px 10px 10px 0;
    font-size: 18px;
    padding: 5px 15px;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: var(--primary-bg);
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.send-button:hover {
    background: hsl(44 93% 40%);
    border-color: hsl(44 93% 40%);
}

/* Comment Item */
.comment-item {
    border-bottom: 1px solid hsl(0 0% 20%);
    padding: 20px 0 16px;
}

.comment-header {
    display: flex;
    margin-bottom: 16px;
}

.comment-author {
    display: flex;
    align-items: center;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-author-info {
    margin-left: 12px;
}

.comment-author-name,
.comment-date {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
}

.comment-author-name {
    color: var(--text-white);
    font-weight: 400;
}

.comment-date {
    color: hsl(0 0% 60%);
}

.comment-text {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-white);
}

.comment-footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-like {
    display: flex;
    align-items: center;
}

.like-icon {
    cursor: pointer;
    margin-right: 8px;
}

.like-icon svg {
    fill: hsl(0 0% 60%);
}

.like-count {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--text-white);
}

.reply-button {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--accent-color);
    background: transparent;
    border: none;
    cursor: pointer;
}

.reply-button:hover {
    text-decoration: underline;
    color: hsl(44 93% 40%);
}

/* Responsive Margins - Matches original exactly */

/* Desktop (1080px+): 64px margins */
@media (min-width: 1080px) {
    .max-width-container,
    .footer-content,
    .applause-text,
    .comments-section {
        margin-left: 64px;
        margin-right: 64px;
    }
}

/* Medium Desktop (904-1079px): 64px margins */
@media (min-width: 904px) and (max-width: 1079.98px) {
    .max-width-container,
    .footer-content,
    .applause-text,
    .comments-section {
        margin-left: 64px;
        margin-right: 64px;
    }
    
    .post-footer {
        margin-bottom: 88px;
    }
}

/* Tablet (728-903px): 48px margins */
@media (min-width: 728px) and (max-width: 903.98px) {
    .max-width-container,
    .footer-content,
    .applause-text,
    .comments-section {
        margin-left: 48px;
        margin-right: 48px;
    }
    
    .post-footer {
        margin-bottom: 88px;
    }
}

/* Mobile (<552px): 24px margins with adjustments */
@media (max-width: 551.98px) {
    .header-content {
        height: 41px;
    }
    
    .post-title {
        font-size: 32px !important;
        line-height: 38px !important;
    }
    
    .post-footer {
        margin-bottom: 80px;
    }
    
    .comments-section {
        padding: 20px 16px;
    }
}

/* Utilities */
.grecaptcha-badge {
    visibility: hidden;
}
