/* Universal Styles */
:root {
    --bg-color: #FFFFFF;
    --text-color: #212529;
    --meta-color: #6c757d;
    --border-color: #e9ecef;
    --header-bg: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
}

/* Header Styles */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#main-header .logo {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #212529;
    text-decoration: none;
}

#main-header nav {
    display: flex;
    gap: 2.5rem;
}

#main-header nav a {
    color: #343a40;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

#main-header nav a:hover {
    color: #0056b3;
}

/* Article Container & Header */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2em;
}

.article-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2em;
    padding-bottom: 1em;
}

.article-header h1 {
    font-family: "Georgia", serif;
    font-size: 2.8rem;
    margin: 0 0 0.25em;
    line-height: 1.2;
}

.article-header .meta {
    font-size: 0.9rem;
    color: var(--meta-color);
}

/* TL;DR Summary Styles */
.tldr-summary {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 4px;
}

.tldr-summary h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-family: "Georgia", serif;
    font-size: 1.2rem;
}

.tldr-summary p {
    margin-bottom: 0;
    font-style: italic;
    color: #495057;
}

/* Social Share Button Styles */
.social-share {
    display: flex;
    gap: 0.75em;
    margin-top: 1.5em;
}

.social-share a {
    display: inline-block;
    padding: 0.5em 1em;
    border-radius: 50px;
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-share a:hover {
    background-color: #ced4da;
    color: #212529;
    transform: translateY(-2px);
}

/* --- Image Collage Styles --- */

/* Original Grid Collage */
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
  width: 100%;
  height: 450px;
  grid-gap: 10px;
  margin: 2em 0;
  border-radius: 8px;
  overflow: hidden;
}

.grid > div {
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.grid > div:hover {
    transform: scale(1.05);
}

.grid-item1 { grid-column: 1/4; grid-row: 1/2; }
.grid-item2 { grid-column: 1/2; grid-row: 2/5; }
.grid-item3 { grid-column: 1/5; grid-row: 5/5; }
.grid-item4 { grid-column: 2/4; grid-row: 2/5; }
.grid-item5 { grid-column: 4/6; grid-row: 1/3; }
.grid-item6 { grid-column: 4/5; grid-row: 3/5; }
.grid-item7 { grid-column: 5/6; grid-row: 3/6; }
.grid-item8 { grid-column: 6/8; grid-row: 1/6; }

/* NEW Angled Collage */
.collage-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 2em 0;
    background-color: white;
}

.collage-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

#img1 {
    clip-path: polygon(2.5% 0, 35.5% 0, 25.5% 100%, 2.5% 100%);
}

#img2 {
    clip-path: polygon(36.5% 0, 69.5% 0, 59.5% 100%, 26.5% 100%);
}

#img3 {
    clip-path: polygon(70.5% 0, 97.5% 0, 97.5% 100%, 60.5% 100%);
}

/* Article Body */
.article-body h2 {
    font-family: "Georgia", serif;
    font-size: 1.8rem;
    margin-top: 2em;
    margin-bottom: 1em;
}

.article-body p {
    margin-bottom: 1.25em;
    font-size: 1.1rem;
}

/* --- Trader Game Styles --- */
#game-container { margin: 3em 0; position: relative; }
#game-container .game-content { position: relative; width: 100%; max-width: 800px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; }
#game-container canvas { background-color: #1A1E2C; border: 1px solid #3A3F51; width: 100%; height: auto; display: block; }
#game-container #startGameBtn, #game-container #nextGameBtn { position: absolute; left: 50%; transform: translate(-50%, -50%); font-family: monospace; font-weight: bold; cursor: pointer; color: #EAEAEA; border: none; border-radius: 10px; transition: all 0.2s ease-in-out; text-shadow: 0 1px 2px rgba(0,0,0,0.4); z-index: 100; }
#game-container #startGameBtn { display: block; top: 58%; padding: 18px 40px; font-size: 24px; background: linear-gradient(145deg, #00BFFF, #008fbf); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 191, 255, 0.4); }
#game-container #startGameBtn:hover { transform: translate(-50%, -52%); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 191, 255, 0.6); }
#game-container #startGameBtn:active { transform: translate(-50%, -49%); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
#game-container #nextGameBtn { display: none; top: 88%; padding: 15px 35px; font-size: 22px; }
#game-container #nextGameBtn.party { background: linear-gradient(145deg, #00BFFF, #008fbf); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 191, 255, 0.4); }
#game-container #nextGameBtn.sad { background: linear-gradient(145deg, #555, #333); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
#game-container #nextGameBtn:hover { transform: translate(-50%, -52%); }
#game-container .live-pnl-popup { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background-color: rgba(26, 30, 44, 0.85); border-radius: 8px; padding: 8px 16px; font-family: monospace; text-align: center; display: none; transition: all 0.3s ease; z-index: 10; border: 1px solid #3A3F51; pointer-events: none; }
#game-container .live-pnl-popup.visible { display: block; }
#game-container .pnl-value { font-size: 28px; font-weight: bold; transition: all 0.2s ease-in-out; }
#game-container .entry-price { font-size: 12px; color: #aaa; }
#game-container .pnl-profit { color: #2E8B57; }
#game-container .pnl-loss { color: #FF6347; }
#game-container .pnl-profit.tier-1 { text-shadow: 0 0 5px rgba(46, 139, 87, 0.5); }
#game-container .pnl-profit.tier-2 { font-size: 32px; text-shadow: 0 0 10px rgba(46, 139, 87, 0.7); }
#game-container .pnl-profit.tier-3 { font-size: 40px; text-shadow: 0 0 20px rgba(46, 139, 87, 1); }
#game-container .pnl-loss.tier-1 { animation: shake 0.8s infinite; }
#game-container .pnl-loss.tier-2 { font-size: 32px; animation: shake 0.5s infinite; }
#game-container .pnl-loss.tier-3 { font-size: 40px; animation: shake 0.3s infinite; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* --- Email Signup & Ad Banner --- */
.email-signup-form { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 2em; margin: 3em 0; text-align: center; }
.email-signup-form h2 { font-family: "Georgia", serif; margin-top: 0; }
.email-signup-form .form-container { display: flex; justify-content: center; margin-top: 1.5em; }
.email-signup-form input[type="email"] { width: 100%; max-width: 350px; padding: 0.8em; border: 1px solid #ced4da; border-radius: 4px 0 0 4px; font-size: 1rem; }
.email-signup-form button { padding: 0.8em 1.5em; border: none; background-color: #007bff; color: white; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 1rem; transition: background-color 0.2s; }
.email-signup-form button:hover { background-color: #0056b3; }
#ad-footer-banner { background-color: #0A192F; color: #EAEAEA; padding: 3em 2em; margin-top: 2em; border-radius: 8px; overflow: hidden; }
#ad-footer-banner .ad-content { display: flex; align-items: center; gap: 2em; }
#ad-footer-banner .ad-icon { width: 60px; height: 60px; background-color: #1D2D44; border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite ease-in-out; }
#ad-footer-banner .ad-text h2 { font-family: "Georgia", serif; font-size: 1.8rem; margin: 0 0 0.5em; color: #FFFFFF; }
#ad-footer-banner .ad-text p { font-size: 1rem; color: #bdc8d4; margin: 0; }
#ad-footer-banner .ad-cta { background-color: #00BFFF; color: #0A192F; padding: 0.8em 1.8em; border-radius: 50px; text-decoration: none; font-weight: bold; white-space: nowrap; transition: all 0.3s ease; }
#ad-footer-banner .ad-cta:hover { background-color: #FFFFFF; transform: scale(1.05); }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.4); } 70% { transform: scale(1.1); box-shadow: 0 0 10px 20px rgba(0, 191, 255, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 191, 255, 0); } }

/* --- Main Footer --- */
.main-footer { text-align: center; padding: 2em; margin-top: 1em; border-top: 1px solid var(--border-color); color: var(--meta-color); }
.main-footer a { color: var(--text-color); }

/* --- Responsive Media Queries --- */
@media (max-width: 800px) { #game-container #startGameBtn { padding: 14px 30px; font-size: 20px; } #game-container #nextGameBtn { padding: 12px 28px; font-size: 18px; } #game-container .pnl-value { font-size: 22px; } #game-container .pnl-loss.tier-2, #game-container .pnl-profit.tier-2 { font-size: 26px; } #game-container .pnl-loss.tier-3, #game-container .pnl-profit.tier-3 { font-size: 32px; } #ad-footer-banner .ad-content { flex-direction: column; text-align: center; } }
@media (max-width: 480px) { .article-header h1 { font-size: 2.2rem; } #game-container #startGameBtn { padding: 12px 25px; font-size: 18px; } #game-container #nextGameBtn { padding: 10px 22px; font-size: 16px; } .email-signup-form .form-container { flex-direction: column; gap: 1em; } .email-signup-form input[type="email"], .email-signup-form button { border-radius: 4px; } }
