@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: #ffffff;
    background:
        radial-gradient(circle at 14% 8%, rgba(129, 118, 255, 0.18), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.08), transparent 26%),
        #050505;
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page {
    width: min(1500px, calc(100% - 48px));
    margin: 0 auto;
    padding-bottom: 100px;
}

/* Navbar */

.navbar {
    position: sticky;
    top: 18px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 70px;
    padding: 18px 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1.3px;
}

.navbar nav {
    display: flex;
    gap: 30px;
}

.navbar nav a {
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    font-weight: 600;
}

.navbar nav a:hover {
    color: white;
}

/* Common */

.label {
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
}

.accent-label {
    color: #948cff;
}

.description {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 20px;
    line-height: 1.9;
}

.button,
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border: none;
    border-radius: 999px;
    background: white;
    color: black;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.button:hover,
.submit-button:hover {
    transform: translateY(-2px);
}

.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* Home */

.hero {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 76px;
    align-items: center;
    min-height: 620px;
}

.hero-text h1,
h1 {
    margin: 24px 0 28px;
    font-size: clamp(56px, 6.4vw, 92px);
    line-height: 0.92;
    letter-spacing: -5px;
    font-weight: 700;
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 42px;
    flex-wrap: wrap;
}

.gallery-panel {
    padding: 24px;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(125, 115, 255, 0.15), rgba(255, 255, 255, 0.045)),
        rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(150, 145, 255, 0.25);
    backdrop-filter: blur(24px);
    box-shadow:
        0 34px 96px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.panel-header,
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header {
    margin-bottom: 18px;
    font-weight: 700;
}

.panel-header a,
.panel-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 170px 170px;
    gap: 12px;
}

.gallery-1 {
    grid-row: span 2;
}

.gallery-img {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border-radius: 20px;
    display: block;
    background: rgba(255, 255, 255, 0.06);
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.gallery-img:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.08));
    opacity: 0;
    transition: 0.25s;
}

.gallery-img:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: rgba(255,255,255,0.72);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-overlay h3 {
    font-size: 22px;
    line-height: 1.08;
    letter-spacing: -0.8px;
}

.panel-footer {
    margin-top: 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
}

.mini-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mini-tags a,
.tag {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 600;
}

/* Sections */

.feature-section,
.workflow-section {
    margin-top: 122px;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 38px;
}

.center-heading {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-heading h2 {
    margin-top: 14px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 0.98;
    letter-spacing: -3px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature-card {
    padding: 32px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
}

.feature-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border-radius: 999px;
    background: rgba(140, 131, 255, 0.18);
    color: #9e96ff;
    font-size: 26px;
}

.feature-number {
    display: inline-block;
    margin-bottom: 12px;
    color: #948cff;
    font-weight: 700;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 30px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.85;
}

.workflow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 40px;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workflow-step span {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #8c83ff, #5d6dff);
    color: white;
    font-weight: 700;
}

.workflow-step p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    font-weight: 700;
}

.step-line {
    width: 90px;
    height: 1px;
    border-top: 1px dashed rgba(140, 131, 255, 0.65);
}

/* Form */

.form-page {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    margin-bottom: 34px;
}

.page-title h1 {
    font-size: clamp(48px, 5.8vw, 78px);
    line-height: 0.98;
}

.record-form {
    display: grid;
    gap: 22px;
    padding: 34px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.record-form label {
    display: grid;
    gap: 12px;
    font-weight: 700;
}

.record-form input,
.record-form textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    outline: none;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    font-size: 16px;
    font-family: inherit;
}

.record-form textarea {
    resize: vertical;
}

.tool-selector-group {
    display: grid;
    gap: 14px;
}

.tool-selector-title {
    font-weight: 700;
}

.tool-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-button {
    padding: 14px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.tool-button.active {
    background: white;
    color: black;
}

/* Library */

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 34px;
}

.library-toolbar {
    margin-bottom: 34px;
}

.library-search {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-form input {
    flex: 1;
    min-width: 240px;
    padding: 16px 18px;
    border: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 15px;
}

.search-form button,
.clear-search,
.sort-select {
    padding: 16px 18px;
    border: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
}

.sort-select option {
    background: #111111;
    color: white;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.view-toggle span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-weight: 700;
}

.view-option {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.view-option.active {
    background: white;
    color: black;
}

.record-grid {
    display: grid;
}

.library-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.library-grid.columns-10 {
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
}

.library-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s;
}

.library-card:hover {
    transform: translateY(-4px);
}

.library-image-link {
    display: block;
    overflow: hidden;
}

.record-photo,
.record-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}

.record-body {
    padding: 16px;
}

.record-meta {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
    font-weight: 800;
}

.record-body h2 {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.15;
}

.record-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
}

.library-grid.columns-10 .record-body {
    display: none;
}

.tag-row {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.tag {
    padding: 8px 12px;
    font-size: 12px;
}

.active-filter {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.68);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 44px;
    border-radius: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
}

/* Detail */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 54px;
    align-items: start;
}

.detail-image-section {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.detail-main-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 34px;
    background: transparent;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.detail-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.06);
}

.carousel-button {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.carousel-button.left {
    left: 16px;
}

.carousel-button.right {
    right: 16px;
}

.carousel-counter {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    font-weight: 700;
}

.carousel-data {
    display: none;
}

.detail-info-section {
    display: grid;
    gap: 26px;
}

.detail-tool {
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 13px;
    font-weight: 800;
}

.detail-info-section h1 {
    margin-bottom: 18px;
    font-size: clamp(42px, 4vw, 70px);
    line-height: 0.95;
}

.detail-meta-box {
    display: inline-grid;
    gap: 6px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-meta-box span {
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta-box strong {
    font-size: 15px;
}

.prompt-card {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #948cff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.prompt-content {
    padding: 22px;
    white-space: pre-wrap;
    color: rgba(255, 255, 255, 0.76);
    line-height: 2;
}

.copy-button {
    padding: 10px 14px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.detail-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.delete-style {
    background: rgba(255, 80, 80, 0.14);
    color: #ff9f9f;
}

/* Responsive */

@media (max-width: 1200px) {
    .hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-image-section {
        position: static;
    }

    .library-grid.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .library-grid.columns-10 {
        grid-template-columns: repeat(5, 1fr);
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 28px, 100%);
    }

    .navbar,
    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .navbar nav {
        flex-wrap: wrap;
    }

    .hero-text h1,
    h1 {
        font-size: 46px;
        letter-spacing: -2px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 140px 140px 140px;
    }

    .gallery-1 {
        grid-row: span 1;
    }

    .panel-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .feature-grid,
    .library-grid.columns-5,
    .library-grid.columns-10 {
        grid-template-columns: repeat(2, 1fr);
    }

    .workflow-steps {
        align-items: flex-start;
        flex-direction: column;
    }

    .step-line {
        width: 1px;
        height: 32px;
        border-top: none;
        border-left: 1px dashed rgba(140, 131, 255, 0.65);
    }
}