/* site/css/pages/index4.css */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #020408; /* Darker than default */
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    margin: 0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --accent-glow: rgba(255, 106, 43, 0.5);
    --grid-gap: 24px;
}

/* Utilities */
.container {
    max-width: 1037px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.text-gradient {
    background: linear-gradient(135deg, #fff9f1 20%, #f15831 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.font-display { font-family: "Times New Roman", serif; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #ffb020, #ff6a2b, #ff9000, #ffb020);
    background-size: 300% 100%;
    animation: gradient-shift 4s ease infinite;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(255, 106, 43, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    gap: 10px;
    z-index: 1;
    padding: 2px 38px;
    margin-top: 10px;
    border-radius: 0;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    transition: left 0.7s;
    z-index: 2;
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 106, 43, 0.6);
    filter: brightness(1.1);
}

.replica-wrapper:hover .btn-primary::before {
    left: 100%;
    transition: 0.5s ease-in-out;
}

.btn-primary:hover::before {
    /* left: 100%;  Moved to wrapper hover */
    /* transition: 0.5s ease-in-out; */
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:hover .btn-icon {
    transform: translateY(2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Background Effects */
.ambient-light {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.light-orb {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: pulse 10s infinite alternate;
}
.light-orb-1 {
    background: radial-gradient(circle, #ff6a2b 0%, transparent 70%);
    top: -20%; left: -10%;
}
.light-orb-2 {
    background: radial-gradient(circle, #ffb020 0%, transparent 70%);
    bottom: -20%; right: -10%;
    animation-delay: -5s;
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    opacity: 0.5;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.1; }
    100% { transform: scale(1.2); opacity: 0.2; }
}

/* Hero Section */
.hero-v2 {
    min-height: 90vh;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    position: relative;
}

.hero-content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: right;
    align-items: center;
    perspective: 1200px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
    z-index: 5;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffb020;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 176, 32, 0.1);
    border: 1px solid rgba(255, 176, 32, 0.2);
    border-radius: 100px;
    width: fit-content;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.2s;
    box-shadow: 0 0 20px rgba(255, 176, 32, 0.05);
}

.hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ffb020;
    box-shadow: 0 0 6px #ffb020;
}

.hero-title {
    font-family: sans-serif;
    font-size: clamp(3rem, 6vw, 105px);
    font-weight: 800;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.03em;
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.4s;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 540px;
    margin: 32px 0 48px;
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.6s;
}

.hero-actions {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s;
    position: relative; /* For absolute positioning of arrow */
}

.hand-drawn-arrow {
    position: absolute;
    top: 110%;
    left: 1%;
    width: 286px;
    height: 155px;
    transform: translateX(10px) rotate(5deg);
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.4s;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
    z-index: 0;
}

.replica-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: rotateY(-12deg) rotateX(4deg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
}

.replica-wrapper:hover {
    transform: rotateY(0) rotateX(0);
}

.replica-wrapper .hero-eyebrow {
    margin-bottom: 0;
    transform: translateZ(40px);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.2s;
}

.replica-wrapper .btn-primary {
    transform: translateZ(40px);
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s;
}

/* Overlay Replica Styles */
.overlay-replica {
    width: 350px; /* Match extension default width */
    height: 100vh; /* Full height like extension */
    max-height: 600px; /* Cap it for the hero section */
    border-radius: 0; /* Extension is flush right, but for demo we can keep slight radius or 0 */
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* transform: rotateY(-12deg) rotateX(4deg); Moved to wrapper */
    /* transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); Moved to wrapper */
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
}

.overlay-replica:hover {
    /* transform: rotateY(0) rotateX(0); Moved to wrapper */
}

.overlay-replica * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.overlay-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: #fff;
    background: transparent;
}

.overlay-replica .header {
    padding: 15px 15px 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overlay-replica .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
}

.overlay-replica .header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-replica .room-badge {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
}

.overlay-replica .client-count {
    font-size: 11px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.overlay-replica .client-count::before {
    content: '●';
    color: #4ade80;
    font-size: 8px;
}

.overlay-replica .auth-toggle {
  cursor: pointer;
  color: #60a5fa;
  font-size: 12px;
  text-decoration: none;
}
.overlay-replica .auth-toggle:hover { text-decoration: underline; }

.overlay-replica .tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.overlay-replica .tab {
    flex: 1;
    text-align: center;
    padding: 6px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s, color 0.2s;
}

.overlay-replica .tab.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 500;
}

.overlay-replica .chat-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.overlay-replica .messages {
    flex: 1;
    overflow-y: auto; /* Match real extension scroll behavior */
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 0px; 
}

/* Custom Scrollbar for messages to match extension */
.overlay-replica .messages::-webkit-scrollbar { width: 6px; }
.overlay-replica .messages::-webkit-scrollbar-track { background: transparent; }
.overlay-replica .messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }
.overlay-replica .messages::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.overlay-replica .message {
    padding: 8px 12px; 
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column; 
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.overlay-replica .message:hover {
    background: rgba(255, 255, 255, 0.08);
}

.overlay-replica .message-header-line {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.overlay-replica .message-meta {
    display: flex;
    align-items: center; 
    margin-bottom: 4px;
    padding-right: 0;
    min-height: 18px;
    position: relative; 
}

.overlay-replica .author-name {
    color: #60a5fa;
    font-weight: 600;
    font-size: 13px;
    margin-right: 8px;
    order: 2; /* Author after time */
}

.overlay-replica .message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 8px;
    font-family: monospace;
    order: 1; /* Time first */
}

.overlay-replica .message-body {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
    line-height: 1.4;
    padding-bottom: 4px;
}

.overlay-replica .message-actions {
    position: relative;
    margin-left: auto; 
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.1s;
    height: 18px; 
    padding-right: 4px; 
    order: 3;
}

/* Hover logic for nested messages */
.overlay-replica .message:hover > .message-header-line > .message-meta > .message-actions {
    opacity: 1;
    pointer-events: auto;
}

/* Reply Button */
.overlay-replica .reply-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.overlay-replica .reply-btn:hover { color: #60a5fa; }

.overlay-replica .input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    gap: 10px;
    z-index: 10;
    flex-shrink: 0;
}

.overlay-replica input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    outline: none;
    font-size: 13px; /* Keeping this as it looks right for the context, though extension relies on inheritance */
    transition: background 0.2s, border 0.2s;
}
.overlay-replica input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.overlay-replica button {
    width: auto;
    padding: 10px 16px; /* Updated to match extension */
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: transform 0.1s, opacity 0.2s;
}
.overlay-replica button:hover { opacity: 0.9; }
.overlay-replica button:active { transform: scale(0.96); }

/* Replies Container */
.overlay-replica .replies-container {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overlay-replica .message.reply {
    padding: 0; 
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.overlay-replica .message.reply:hover {
    background: transparent;
}

.overlay-replica .replies-controls {
    margin-top: 4px;
}
.overlay-replica .replies-control-btn {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}
.overlay-replica .replies-control-btn:hover { opacity: 1; text-decoration: underline; }

.overlay-replica .vote-container {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
}

.overlay-replica .vote-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 2px 4px; /* Updated to match extension */
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 2px; /* Updated to match extension */
    transition: all 0.2s;
}
.overlay-replica .vote-btn:hover { color: #fff; }
.overlay-replica .vote-btn.active.up { color: #4ade80; opacity: 1; }
.overlay-replica .vote-btn.active.down { color: #f87171; opacity: 1; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.2s, bounce 2s infinite 2s;
    transition: color 0.3s;
    cursor: pointer;
    z-index: 10;
}

.scroll-indicator:hover {
    color: var(--accent-glow);
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Bridge label between hero and manifesto */
.doc-bridge-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.doc-bridge-label::before,
.doc-bridge-label::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15));
}

.doc-bridge-label::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

/* Document Section (Post Style) */
.doc-section {
    padding: 60px 0 120px;
    position: relative;
    z-index: 10;
}

.doc-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Post Frame mimicking app post style */
.post-card {
    padding: 1.25rem;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.6));
    font-size: 0.9rem;
    border-bottom: none;
    padding-bottom: 0;
}

.post-header-left {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    flex: 0 0 auto;
}

.post-author {
    font-weight: 800;
    color: var(--text-secondary);
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-username {
    font-size: 0.9rem;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.6));
    margin: 0;
}

.post-author-container {
    display: block;
    align-items: center;
    gap: 4px;
}

.post-time {
    white-space: nowrap;
}

/* Post Content (Markdown) */
.md {
    color: var(--text-secondary);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.md p {
    margin: 0.65rem 0;
}
.md p:first-child { margin-top: 0; }
.md p:last-child { margin-bottom: 0; }

.md h1, .md h2, .md h3 {
    margin: 0.9rem 0 0.5rem;
    line-height: 1.25;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.md h1 { font-size: 1.25rem; }
.md h2 { font-size: 1.1rem; border-bottom: none; padding-bottom: 0; }
.md h3 { font-size: 1rem; }

.md ul, .md ol {
    margin: 0.65rem 0 0.65rem 1.25rem;
}

.md li + li {
    margin-top: 0.2rem;
}

.md blockquote {
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-primary);
    font-style: italic;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 1.1rem;
}

.md pre {
    margin: 0.75rem 0;
    padding: 0.9rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: auto;
}

.md code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
    padding: 0.12em 0.35em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.md pre code {
    padding: 0;
    border: 0;
    background: transparent;
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding-top: 0;
    border-top: none;
}

.post-actions-spacer { flex: 1; }

.vote-container {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.vote-btn:hover { background: rgba(255, 255, 255, 0.1); }
.vote-btn.active { color: var(--accent-primary); background: rgba(255, 106, 43, 0.1); }

.glass-card {
    background: rgba(20, 20, 22, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Footer */
.footer-v2 {
    border-top: 1px solid var(--card-border);
    padding: 60px 0;
    margin-top: 60px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 40px;
}
.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}
.footer-col a:hover { color: white; }

/* Responsive */
@media (max-width: 600px) {
    .hero-title { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .doc-content h2 { font-size: 1.75rem; }
    .doc-post-frame { padding: 24px; }
}

@media (max-width: 900px) {
    .hero-v2 {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding-top: 60px;
    }
    .hero-content {
        align-items: center;
        margin-bottom: 40px;
        max-width: 100%;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-visual {
        width: 100%;
        perspective: none;
    }
    .overlay-replica {
        transform: none;
        margin: 0 auto;
        height: 500px; /* Slightly shorter on mobile */
    }
}

/* Notifications Override for Index4 */
.notifications-wrapper {
    position: static;
    display: inline-flex;
    align-items: center;
}

.notifications-trigger {
    position: relative;
    /* mk4-header__iconBtn handles the look, we just need positioning for badge */
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444; /* accent-error fallback */
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

.badge.hidden { display: none; }

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 17px);
    left: 0;
    width: 100%;
    background: rgb(20 20 22);
    border: 1px solid rgb(20 20 22);
    box-shadow: 0 24px 80px rgb(0 0 0 / 34%);
    border-radius: 28px;
    padding: 10px;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 160ms ease, transform 160ms ease;
}

.notifications-dropdown.hidden {
    display: flex; /* Override display: none */
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.mk4-header.is-bottom .notifications-dropdown {
    top: auto;
    bottom: calc(100% + 17px);
    transform: translateY(0);
}

.mk4-header.is-bottom .notifications-dropdown.hidden {
    transform: translateY(6px);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}

.notifications-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px; /* Space for scrollbar */
}

.notifications-list::-webkit-scrollbar { width: 4px; }
.notifications-list::-webkit-scrollbar-track { background: transparent; }
.notifications-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }

.notification-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 12px;
    margin-bottom: 2px;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateY(-1px);
    border-color: transparent;
}

.notification-item.unread {
    background: rgba(255, 106, 43, 0.1); /* accent-primary fallback */
    border-color: transparent;
}

.notification-item:last-child { border-bottom: none; margin-bottom: 0; }

.btn-text {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.btn-text:hover { text-decoration: underline; }

.loading-muted {
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}