/* =============================================
   THE CROWN OF WESTHAVEN - Official Website
   CSS Styles - Authentic 2001 Web Design
   ============================================= */

/* Reset & Base */
body {
    margin: 0;
    padding: 0;
    background-color: #0a0a1a;
    background-image: url('../images/backgrounds/stars-tile.gif');
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #e8dcc0;
    text-align: center;
    line-height: 1.5;
}

a:link {
    color: #ffdd44;
    text-decoration: underline;
}

a:visited {
    color: #ddaa77;
    text-decoration: underline;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
    background-color: #444477;
    padding: 1px 2px;
}

a:active {
    color: #ff8833;
}

/* Page Borders */
.page-border-top {
    height: 20px;
    background: linear-gradient(to bottom, #4a3c1a 0%, #8b7355 50%, #4a3c1a 100%);
    border-bottom: 2px solid #2a1c0a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-border-bottom {
    height: 20px;
    background: linear-gradient(to bottom, #4a3c1a 0%, #8b7355 50%, #4a3c1a 100%);
    border-top: 2px solid #2a1c0a;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.5);
    margin-top: 20px;
}

/* Main Container - Fixed 800px width */
.main-container {
    width: 800px;
    margin: 0 auto;
    background-color: #1a1a2e;
    background-image: url('../images/backgrounds/parchment-dark.gif');
    border-left: 3px solid #4a3c1a;
    border-right: 3px solid #4a3c1a;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* Logo Container */
.logo-container {
    padding: 20px 0 25px 0;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    border-bottom: 2px solid #4a3c1a;
    position: relative;
}

#gameLogo {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Header logo image (logo-only asset matching the box-art logo) */
.logo-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

.logo-link:hover {
    background: transparent;
    padding: 0;
}

#gameLogoImg {
    display: block;
    width: 760px;
    height: 160px;
    max-width: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    border: 3px ridge #5a5a7a;
    box-shadow: 0 6px 18px rgba(0,0,0,0.65);
    background: rgba(0,0,0,0.18);
}

/* Navigation Bar */
.navbar {
    width: 100%;
    background: linear-gradient(to bottom, #2a2a4a 0%, #1a1a3a 50%, #0a0a2a 100%);
    border-top: 1px solid #5a5a7a;
    border-bottom: 2px solid #0a0a1a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 6px rgba(0,0,0,0.45);
}

.nav-item {
    padding: 0;
}

.nav-item a {
    color: #ccaa66;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    padding: 8px 15px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.12));
    border-left: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(0,0,0,0.35);
}

.nav-item a:hover {
    color: #ffdd88;
    background-color: transparent;
    text-shadow: 0 0 5px #ffcc00;
    padding: 8px 15px;
    background: linear-gradient(to bottom, rgba(255,210,120,0.10), rgba(0,0,0,0.15));
}

/* Prevent global link hover padding from breaking navbar layout */
.navbar a:hover {
    padding: 8px 15px;
    background-color: transparent;
}

.nav-item.active a {
    color: #ffcc00;
    text-shadow: 0 0 6px rgba(255,204,0,0.45);
    box-shadow: inset 0 -2px 0 rgba(255,204,0,0.85);
}

.nav-separator {
    color: #665533;
    font-size: 10px;
    padding: 0 2px;
}

/* Content Frame */
.content-frame {
    margin: 15px;
    background-color: #1a1a35;
    border: 3px ridge #5a5a7a;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.content-inner {
    padding: 20px 30px;
    text-align: left;
    color: #e0d8c8;
}

/* Section Titles */
.section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    color: #ffcc00;
    text-align: center;
    margin: 20px 0 15px 0;
    text-shadow: 2px 2px 2px #000000;
    letter-spacing: 2px;
}

h1.section-title {
    font-size: 22px;
    margin-top: 10px;
}

.title-gem {
    display: inline-block;
    color: #ffcc44;
    font-size: 14px;
    vertical-align: middle;
    text-shadow: 0 0 5px #ffaa00;
    margin: 0 5px;
}

/* Parchment Box */
.parchment-box {
    background-color: #f5e6c8;
    border: 2px inset #8a7a5a;
    padding: 15px 20px;
    margin: 15px 0;
    color: #2a2010;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
}

.parchment-box p {
    color: #3a2810;
    line-height: 1.7;
    margin: 10px 0;
    font-size: 13px;
}

.parchment-box strong {
    color: #6a2000;
}

.parchment-box em {
    color: #5a4020;
}

.intro-text {
    font-size: 13px;
}

.drop-cap {
    font-family: Georgia, serif;
    font-size: 42px;
    float: left;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 5px;
    color: #6a2010;
    font-weight: bold;
}

/* Fancy Divider */
.fancy-divider {
    border: none;
    height: 20px;
    background: url('../images/ui/divider.gif') center center no-repeat;
    margin: 25px 0;
}

/* Features Table */
.features-table {
    width: 100%;
    border: 2px outset #5a5a7a;
    background-color: #1e1e40;
    margin: 15px 0;
}

.features-table tr {
    border-bottom: 1px solid #3a3a5a;
}

.features-table .alt-row {
    background-color: #252550;
}

.feature-icon {
    width: 40px;
    text-align: center;
    font-size: 18px;
    border-right: 1px solid #4a4a6a;
    background-color: rgba(0,0,0,0.2);
}

.feature-text {
    padding: 10px 15px;
    line-height: 1.6;
    color: #e0d8c8;
}

.feature-text strong {
    color: #ffdd77;
}

/* News Box */
.news-box {
    background-color: #141428;
    border: 2px inset #4a4a6a;
    padding: 12px 18px;
    margin: 15px 0;
}

.news-item {
    padding: 12px 0;
    border-bottom: 1px dashed #4a4a6a;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #aaaa88;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.news-headline {
    color: #ffdd44;
    font-weight: bold;
    margin-left: 10px;
}

.news-item p {
    margin: 8px 0 0 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #ccccbb;
}

/* System Requirements Table */
.sysreq-table {
    width: 80%;
    margin: 15px auto;
    border: 2px outset #5a5a7a;
    background-color: #1e1e40;
    border-collapse: collapse;
}

.sysreq-table th {
    background: linear-gradient(to bottom, #4a4a7a 0%, #3a3a6a 100%);
    color: #ffee66;
    padding: 10px;
    border: 1px solid #5a5a8a;
    font-size: 12px;
    letter-spacing: 1px;
}

.sysreq-table td {
    padding: 15px 20px;
    border: 1px solid #4a4a6a;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.9;
    vertical-align: top;
    color: #d8d0c0;
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #1a1a2a 0%, #0a0a1a 100%);
    border-top: 2px solid #4a3c1a;
    padding: 15px;
    font-size: 11px;
    color: #999988;
}

.footer-table {
    width: 100%;
}

.footer-left, .footer-right {
    width: 150px;
    vertical-align: middle;
}

.footer-center {
    text-align: center;
}

.footer-center p {
    margin: 3px 0;
}

.badge {
    width: 88px;
    height: 31px;
    margin: 2px;
    border: 1px solid #333;
}

.counter {
    font-family: 'Courier New', monospace;
    color: #00cc00;
    margin-top: 10px !important;
}

.last-updated {
    font-size: 9px;
    color: #555544;
    text-align: right;
}

.webring {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #333322;
    font-size: 10px;
}

.webring a {
    color: #888866;
}

.webring a:hover {
    color: #ffcc00;
}

/* Retro Badges (footer) */
.retro-badge {
    display: inline-block;
    background: linear-gradient(to bottom, #3a3a5a 0%, #2a2a4a 50%, #1a1a3a 100%);
    border: 2px outset #5a5a7a;
    padding: 4px 8px;
    margin: 2px;
    font-size: 9px;
    color: #aabbcc;
    text-align: center;
    line-height: 1.3;
}

/* =============================================
   HINTS PAGE STYLES
   ============================================= */

/* Warning Box */
.hints-warning-box {
    background-color: #351818;
    border: 3px double #cc5555;
    padding: 18px 22px;
    margin: 15px 0;
    text-align: center;
}

.hints-warning-box p {
    margin: 10px 0;
    color: #f0ccaa;
    font-size: 13px;
}

.hints-warning-box strong {
    color: #ff8888;
    font-size: 15px;
}

/* Retro Button */
.retro-button {
    background: linear-gradient(to bottom, #4a4a6a 0%, #2a2a4a 50%, #1a1a3a 100%);
    border: 2px outset #5a5a7a;
    color: #ffcc00;
    padding: 5px 15px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
    margin-top: 5px;
}

.retro-button:hover {
    background: linear-gradient(to bottom, #5a5a7a 0%, #3a3a5a 50%, #2a2a4a 100%);
}

.retro-button:active {
    border-style: inset;
}

/* Chapter Containers */
.hint-chapter {
    margin: 10px 0;
    background-color: #181835;
    border: 2px ridge #4a4a6a;
}

.chapter-header {
    background: linear-gradient(to bottom, #2e2e55 0%, #202045 100%);
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #4a4a6a;
}

.chapter-header:hover {
    background: linear-gradient(to bottom, #3a3a65 0%, #2a2a55 100%);
}

.chapter-arrow {
    color: #ffdd55;
    margin-right: 10px;
    font-size: 11px;
}

.chapter-title {
    color: #ffdd88;
    font-weight: bold;
    font-size: 14px;
}

.chapter-status {
    color: #aaaa88;
    font-size: 11px;
    margin-left: 10px;
}

.chapter-status.coming-soon {
    color: #888877;
    font-style: italic;
}

.chapter-content {
    padding: 15px;
    background-color: #121228;
}

.chapter-intro {
    background-color: #1e1e3a;
    border-left: 3px solid #5a5a8a;
    padding: 12px 18px;
    margin-bottom: 15px;
}

.chapter-intro p {
    margin: 0;
    color: #ccccbb;
    font-style: italic;
    line-height: 1.6;
}

.chapter-placeholder {
    text-align: center;
    padding: 30px;
    color: #888877;
}

.chapter-placeholder p {
    margin: 5px 0;
    font-size: 13px;
}

/* Puzzle Items */
.puzzle-item {
    margin: 10px 0;
    background-color: #1a1a38;
    border: 1px solid #3a3a5a;
}

.puzzle-header {
    padding: 10px 14px;
    cursor: pointer;
    background-color: #222245;
    border-bottom: 1px solid #3a3a5a;
}

.puzzle-header:hover {
    background-color: #2a2a55;
}

.puzzle-arrow {
    color: #99cc99;
    margin-right: 8px;
    font-size: 10px;
}

.puzzle-title {
    color: #bbddbb;
    font-size: 13px;
}

.puzzle-hints {
    padding: 14px 18px;
}

.puzzle-description {
    background-color: #1e1e35;
    padding: 12px 15px;
    border: 1px inset #3a3a5a;
    color: #ddddc8;
    font-style: italic;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* Individual Hints */
.hint-item {
    margin: 10px 0;
    padding: 10px 12px;
    background-color: #141428;
    border: 1px solid #3a3a4a;
}

.hint-reveal-btn {
    background: linear-gradient(to bottom, #456045 0%, #355035 50%, #254025 100%);
    border: 2px outset #557755;
    color: #ccffcc;
    padding: 6px 14px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.hint-reveal-btn:hover {
    background: linear-gradient(to bottom, #557055 0%, #456545 50%, #355535 100%);
    color: #eeffee;
}

.hint-reveal-btn.hint-solution {
    background: linear-gradient(to bottom, #654545 0%, #553535 50%, #452525 100%);
    border-color: #775555;
    color: #ffcccc;
}

.hint-reveal-btn.hint-solution:hover {
    background: linear-gradient(to bottom, #755555 0%, #654545 50%, #553535 100%);
    color: #ffeeee;
}

.hint-text {
    margin-top: 12px;
    padding: 12px 15px;
    background-color: #1e331e;
    border: 1px solid #3a5a3a;
    color: #cceecc;
}

.hint-text p {
    margin: 8px 0;
    line-height: 1.7;
    font-size: 12px;
}

.hint-text strong {
    color: #ffee99;
}

.hint-text em {
    color: #aaccff;
}

/* Hints Footer */
.hints-footer {
    text-align: center;
    padding: 18px;
    margin-top: 20px;
    background-color: #1e1e35;
    border: 1px inset #4a4a6a;
}

.hints-footer p {
    margin: 8px 0;
    color: #aaaa99;
    font-size: 12px;
}

.hints-footer em {
    font-size: 11px;
    color: #999988;
}

.hint-hotline {
    margin-top: 15px !important;
    padding-top: 12px;
    border-top: 1px dashed #4a4a5a;
    color: #ffdd55 !important;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* =============================================
   SCREENSHOT STYLES
   ============================================= */

.screenshot-container {
    margin: 15px 0;
    text-align: center;
}

.game-screenshot {
    border: 3px ridge #5a5a7a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background-color: #1a1a2a;
    display: block;
    margin: 0 auto;
}

.screenshot-caption {
    margin-top: 8px;
    font-size: 11px;
    color: #aaaa99;
    font-style: italic;
}

/* Prevent global a:hover padding from shifting image thumbnails */
.gallery-item a,
#screenshotsGalleryMount a,
#artGalleryMount a {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

/* Same fix for hint screenshots (not inside gallery mounts) */
.screenshot-container a {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    cursor: zoom-in;
}

.gallery-item a:hover,
#screenshotsGalleryMount a:hover,
#artGalleryMount a:hover {
    background: transparent;
    padding: 0;
}

.screenshot-container a:hover {
    background: transparent;
    padding: 0;
}

/* Click to enlarge text */
.screenshot-container::after {
    content: "📷 Click to enlarge";
    display: block;
    font-size: 9px;
    color: #666655;
    margin-top: 4px;
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

/* Gallery Pagination */
.gallery-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 10px 0 14px 0;
}

.gallery-pager-left {
    justify-self: start;
}

.gallery-pager-mid {
    justify-self: center;
}

.gallery-pager-right {
    justify-self: end;
}

.gallery-pager-status {
    color: #ccccbb;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.gallery-pager .retro-button {
    margin-top: 0;
}

.gallery-item {
    flex: 0 0 auto;
    text-align: center;
}

.gallery-item .screenshot-container::after {
    display: none;
}

/* =============================================
   LIGHTBOX
   ============================================= */

.lightbox-open {
    overflow: hidden;
}

.lightbox-root {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
}

.lightbox-root.is-hidden {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.lightbox-panel {
    position: relative;
    max-width: min(1100px, 92vw);
    max-height: 90vh;
    background: linear-gradient(to bottom, #1a1a35 0%, #0f0f22 100%);
    border: 3px ridge #5a5a7a;
    box-shadow: 0 12px 35px rgba(0,0,0,0.75);
    padding: 12px;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 2px outset #6a6a8a;
    background: linear-gradient(to bottom, #2a2a4a 0%, #151532 100%);
    color: #ffdd88;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255,204,0,0.6);
}

.lightbox-body {
    margin-top: 22px;
    display: grid;
    place-items: center;
}

.lightbox-img {
    max-width: min(1060px, 88vw);
    max-height: 72vh;
    width: auto;
    height: auto;
    border: 2px inset #4a4a6a;
    background: #0a0a1a;
}

.lightbox-caption {
    margin-top: 10px;
    color: #ccccbb;
    font-size: 11px;
    text-align: center;
    font-style: italic;
}

/* =============================================
   COMMUNITY PAGE STYLES
   ============================================= */

.retro-input {
    background-color: #1a1a2a;
    border: 2px inset #4a4a6a;
    color: #ccccbb;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    padding: 4px;
}

.retro-input:focus {
    outline: 1px solid #6a6a8a;
    background-color: #1a1a3a;
}

/* Guestbook Entries */
.guestbook-entry {
    background-color: rgba(20, 20, 30, 0.5);
    border: 1px solid #3a3a5a;
    border-left: 3px solid #6a5a3a;
    padding: 12px;
    margin-bottom: 12px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.entry-name {
    color: #ffcc66;
    font-weight: bold;
    font-size: 12px;
}

.entry-location {
    color: #88aacc;
    font-size: 10px;
}

.entry-date {
    color: #888877;
    font-size: 10px;
}

.entry-message {
    color: #ccccbb;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

/* Links List */
.link-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.link-list li {
    margin: 6px 0;
    padding-left: 15px;
    position: relative;
}

.link-list li::before {
    content: "►";
    position: absolute;
    left: 0;
    color: #6a5a3a;
    font-size: 10px;
}

/* Webring Box */
.webring-box {
    margin: 20px 0;
}

/* Loading message */
.loading-message {
    text-align: center;
    padding: 60px 20px;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 40px;
    background-color: rgba(50, 20, 20, 0.5);
    border: 1px solid #5a3a3a;
}
