@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

:root {
    --bg-primary: #0b1120;
    --bg-surface: #141b2e;
    --bg-surface-raised: #1b2438;
    --accent-cyan: #00d9ff;
    --accent-gold: #ffb800;
    --text-primary: #f1f5f9;
    --text-muted: #8b96ab;
    --border-soft: rgba(255, 255, 255, 0.08);
    --font-display: 'Rajdhani', 'Zen Kaku Gothic New', sans-serif;
    --font-body: 'Zen Kaku Gothic New', sans-serif;
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    margin: 0;
    touch-action: manipulation;
}

p {
    margin: 0;
}

a,
a:visited {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
}

button {
    border: none;
    border-radius: 999px;
    background-color: var(--accent-cyan);
    color: #04121c;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -8px var(--accent-cyan);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 48px;
}

header {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 20px 0;
    margin-bottom: 32px;
}

.header_bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header_content1 {
    margin: 0;
}

.header_content1 button {
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid var(--border-soft);
}

.header_content1 button:hover {
    color: var(--text-primary);
    border-color: var(--accent-gold);
    box-shadow: none;
}

.header_content2 {
    display: flex;
    gap: 10px;
}

.header_content2 a {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    padding: 8px 16px;
    font-size: 14px;
    font-family: var(--font-display);
    font-weight: 500;
}

.header_content2 a:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

@media (max-width: 600px) {
    header {
        padding: 14px 16px 0;
        margin-bottom: 20px;
    }

    main {
        padding: 0 16px 24px;
    }
}

/* ==========================================================================
   共通フォームパーツ（create / show / login）
   ========================================================================== */

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.field input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: var(--bg-surface-raised);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: var(--font-body);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.field input::placeholder {
    color: #52607a;
}

.field input:focus,
.field input:focus-visible {
    outline: none;
    border-color: var(--accent-cyan);
}

.form-submit {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
}

/* パネル型カード（create-panel / login-card / score-create.blade.php で共通利用） */
.panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   home.blade.php
   ========================================================================== */

.page_header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.page_header img {
    height: 40px;
}

.page_header h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    margin: 0;
}

.currybox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.currylist {
    width: 100%;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    text-align: center;
}

.curry-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
}

.curry-date {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.curry-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}

.curry-action {
    width: 100%;
    justify-content: center;
    background: var(--accent-cyan);
    color: #04121c;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 999px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.curry-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -8px var(--accent-cyan);
}

.curry-action-secondary {
    background: var(--bg-surface-raised);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}

.curry-action-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: none;
}

@media (max-width: 600px) {
    .page_header {
        margin-bottom: 16px;
    }

    .currybox {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ==========================================================================
   create.blade.php
   ========================================================================== */

.create-panel {
    max-width: 380px;
    margin: 40px auto 0;
    padding: 32px 26px;
}

.create-panel h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--accent-cyan);
    margin: 0 0 22px;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 480px) {
    .create-panel {
        margin-top: 20px;
        padding: 26px 20px;
    }
}

/* ==========================================================================
   login.blade.php
   ========================================================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 340px;
    padding: 36px 28px;
}

.login-eyebrow {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3em;
    color: var(--accent-cyan);
    margin: 0 0 8px;
    text-align: center;
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
    margin: 0 0 28px;
}

.login-error {
    background: rgba(255, 184, 0, .12);
    border: 1px solid var(--accent-gold);
    color: #ffd88a;
    font-size: 13px;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 18px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 22px;
    }
}

/* ==========================================================================
   show.blade.php
   ========================================================================== */

.carry-page {
    position: relative;
    background: radial-gradient(circle at 50% -10%, var(--bg-surface-raised) 0%, var(--bg-primary) 55%);
    color: var(--text-primary);
    padding: 40px 20px 56px;
    border-radius: var(--radius-lg);
}

.carry-hero {
    text-align: center;
    margin-bottom: 40px;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.35em;
    color: var(--accent-cyan);
    margin: 0 0 12px;
}

.carry-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 900;
    margin: 0 0 8px;
}

.carry-date {
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    margin: 0;
}

.carry-delete-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-surface-raised);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
    border-radius: 50%;
}

.carry-delete-btn:hover {
    color: #fff;
    background: #d64545;
    border-color: #d64545;
    box-shadow: none;
    transform: none;
}

.view-tabs {
    position: relative;
    display: flex;
    max-width: 320px;
    margin: 0 auto 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 4px;
}

.view-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent-cyan);
    border-radius: 999px;
    box-shadow: 0 0 16px -2px var(--accent-cyan);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.view-tabs[data-active="scores"]::before {
    transform: translateX(100%);
}

.view-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    padding: 10px 12px;
    box-shadow: none;
    transition: color 0.2s ease;
}

.view-tab:hover {
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

.view-tab.active,
.view-tab.active:hover {
    color: #04121c;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto 32px;
    flex-wrap: wrap;
}

.summary-stat {
    flex: 1 1 120px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    text-align: center;
    animation: summary-float-up 2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-stat:nth-child(1) {
    animation-delay: 4s;
}

.summary-stat:nth-child(2) {
    animation-delay: 2s;
}

.summary-stat:nth-child(3) {
    animation-delay: 0s;
}

@keyframes summary-float-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-stat span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.summary-stat strong {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.carrylist {
    position: relative;
    flex: 0 0 100%;
    height: 340px;
}

.track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
}

.carrybox {
    display: flex;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}

.slider-wrapper {
    display: flex;
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 60px;
}

.slider-wrapper > button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    z-index: 100;
    background: var(--bg-surface-raised);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.6);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.slider-wrapper > button:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-50%);
    box-shadow: 0 8px 20px -10px var(--accent-cyan);
}

.slider-wrapper > button:first-of-type {
    left: 6px;
}

.slider-wrapper > button:last-of-type {
    right: 6px;
}

.card_inner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 265px;
    height: 265px;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.score-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface-raised);
    color: var(--text-muted);
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.score-delete-btn:hover {
    background: #d64545;
    color: #fff;
}

.confirm-popover {
    background: var(--bg-surface-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    padding: 24px;
    max-width: 300px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.confirm-popover::backdrop {
    background: rgba(2, 6, 16, 0.7);
}

.confirm-popover p {
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 20px;
    text-align: center;
}

.confirm-actions {
    display: flex;
    gap: 10px;
}

.confirm-actions button {
    flex: 1;
}

.confirm-cancel {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.confirm-cancel:hover {
    color: var(--text-primary);
    border-color: var(--accent-gold);
    box-shadow: none;
}

.confirm-delete {
    background-color: #d64545;
    color: #fff;
}

.confirm-delete:hover {
    box-shadow: 0 8px 16px -8px #d64545;
}

.card_inner > p {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.04em;
    margin: 0;
}

.score-ring {
    --pct: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--accent-cyan) calc(var(--pct) * 1%), var(--bg-surface-raised) 0);
}

.score-ring-inner {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
}

.score-ring-inner strong {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.score-ring-inner span {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 600px) {
    .carry-page {
        padding: 24px 14px 32px;
    }

    .carry-hero {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .slider-wrapper {
        max-width: 320px;
        padding: 0 50px;
    }

    .slider-wrapper > button {
        height: 40px;
        width: 40px;
        font-size: 20px;
    }

    .slider-wrapper > button:first-of-type {
        left: 5px;
    }

    .slider-wrapper > button:last-of-type {
        right: 5px;
    }

    .card_inner {
        width: 270px;
        height: 270px;
    }

    .carrylist {
        height: 300px;
    }
}
