* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding: 40px 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-link {
    display: inline-block;
    color: #0366d6;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 1em;
    transition: color 0.3s;
}

.back-link:hover {
    color: #0256b9;
    text-decoration: underline;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

h1 {
    font-size: 2em;
    color: #333;
}

.authors {
    color: #777;
    font-size: 1em;
    margin-bottom: 20px;
}

.project-section {
    margin-bottom: 50px;
}

.project-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.project-image-half {
    width: 50%;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/*
  Phone screenshot layout.
  .phone-row holds 1-3 iPhone screenshots side by side, centered,
  and stacks them vertically on narrow screens.
*/
.phone-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 16px;
}

.screen-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.screen-gallery figure {
    color: #555;
    font-size: 0.9em;
    text-align: center;
}

.phone-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.watch-gallery {
    grid-template-columns: repeat(3, minmax(0, 150px));
    justify-content: center;
}

.screen-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 2;
    object-fit: cover;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.watch-gallery img {
    aspect-ratio: auto;
    height: auto;
    object-fit: contain;
}

.phone-shot {
    width: 240px;
    max-width: 100%;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.watch-shot {
    width: 150px;
    max-width: 100%;
    border-radius: 22px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.figure-caption {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .image-row {
        flex-direction: column;
    }
    .project-image-half {
        width: 100%;
    }
    .title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .screen-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .phone-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .screen-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .phone-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .watch-gallery {
        grid-template-columns: repeat(2, minmax(0, 150px));
    }
}

.project-description {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
}

.project-description p {
    margin-bottom: 10px;
}

h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 15px;
    margin-top: 30px;
    border-left: 4px solid #0366d6;
    padding-left: 12px;
}

h3 {
    font-size: 1.2em;
    color: #444;
    margin-bottom: 10px;
    margin-top: 20px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.tag {
    background-color: #e8f4ff;
    color: #0366d6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.highlight-box {
    background-color: #f0f7ff;
    border-left: 4px solid #0366d6;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #444;
}

.warning-box {
    background-color: #fff8f0;
    border-left: 4px solid #e08a1e;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #444;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.metric-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #0366d6;
}

.metric-label {
    font-size: 0.85em;
    color: #777;
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95em;
}

th {
    background-color: #0366d6;
    color: white;
    padding: 10px 14px;
    text-align: left;
}

td {
    padding: 9px 14px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
    vertical-align: top;
}

tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.pipeline-block {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 18px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    color: #333;
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: pre;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.92em;
    color: #333;
}

.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0366d6;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 0.95em;
    transition: background-color 0.3s;
}

.pdf-link:hover {
    background-color: #e0e0e0;
    text-decoration: underline;
}

.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #24292f;
    text-decoration: none;
    padding: 10px 18px;
    background-color: #f0f0f0;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 30px;
    transition: background-color 0.3s;
}

.repo-link:hover {
    background-color: #e4e8ec;
}

.repo-icon {
    width: 20px;
    height: 20px;
}

ul, ol {
    padding-left: 22px;
    color: #555;
}

ul li, ol li {
    margin-bottom: 8px;
}

.result-badge {
    display: inline-block;
    background: #e8f4ff;
    color: #0366d6;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.result-badge.done {
    background: #eaf7ee;
    color: #1a7f37;
}

.result-badge.fail {
    background: #fff0f0;
    color: #cc3333;
}

.stage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 0.9em;
    color: #555;
}

.stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ---- Version navigation and release notes (shared by all Golf Clicker pages) ---- */

.version-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.version-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #d0d7de;
    color: #0366d6;
    background: #fff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.version-pill:hover {
    background: #f0f7ff;
}

.version-pill.current {
    background: #0366d6;
    border-color: #0366d6;
    color: #fff;
}

.version-banner {
    background-color: #fff8f0;
    border-left: 4px solid #e08a1e;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
    color: #444;
}

.version-banner a {
    color: #0366d6;
}

.change-list {
    list-style: none;
    padding-left: 0;
}

.change-list li {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fcfcfc;
}

.change-list .why {
    display: block;
    color: #777;
    font-size: 0.92em;
    margin-top: 4px;
}

.label {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 7px;
    margin-right: 6px;
    vertical-align: 1px;
}

.label.feedback { background: #eaf7ee; color: #1a7f37; }
.label.fix { background: #fff0f0; color: #cc3333; }
.label.new { background: #e8f4ff; color: #0366d6; }
.label.limit { background: #fff8f0; color: #b2650f; }

.screen-gallery.phone-gallery.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screen-gallery img.top {
    object-position: top;
}

.watch-gallery.four {
    grid-template-columns: repeat(4, minmax(0, 150px));
}

@media (max-width: 768px) {
    .watch-gallery.four {
        grid-template-columns: repeat(2, minmax(0, 150px));
    }
}

.page-footer {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
    color: #777;
    font-size: 0.92em;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.page-footer a {
    color: #0366d6;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* ---- App Store link (current-version page) ---- */

.store-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 14px;
    margin: -8px 0 24px;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88em;
    color: #555;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ea043;
    box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.18);
}

.app-store-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 0.92em;
    font-weight: 600;
}

.app-store-button:hover {
    background: #333;
}

@media (max-width: 768px) {
    .store-row {
        justify-content: flex-start;
    }
}
