/* ==========================================================================
   ClipPocket - Global Style Sheets
   ========================================================================== */

    :root {
     /* Color Palette - Premium White, Red & Black */
     --primary: #e50914;
     --primary-hover: #ff1e27;
     --primary-light: rgba(229, 9, 20, 0.08);
     --bg: #fcfcfc;
     --card-bg: #ffffff;
     --text: #0a0a0a;
     --text-muted: #2d2d2d;
     --text-light: #6e6e73;
     --border: #e5e5e5;
     --border-hover: #000000;
     --danger: #ff3b30;
     --danger-hover: #ff453a;
     --danger-light: rgba(255, 59, 48, 0.1);
     --success: #34c759;
     --success-hover: #30d158;
     --success-light: rgba(52, 199, 89, 0.1);
     --warning: #ff9f0a;
     --warning-light: rgba(255, 159, 10, 0.1);

     /* Spacing & Sizes */
     --radius-sm: 6px;
     --radius-md: 10px;
     --radius-lg: 16px;
     --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
     --shadow-md: 0 10px 30px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.08);
     --shadow-lg: 0 20px 40px rgba(0,0,0,0.1), 0 0 15px rgba(229, 9, 20, 0.03);
     --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

     /* Layout Constraints */
     --header-height: 70px;
     --content-max-width: 1200px;
}

/* Base resets & typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.main-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--primary);
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 12px;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 550;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--text);
    background-color: var(--bg);
}

.nav-link-btn {
    background-color: var(--text);
    color: white !important;
}

.nav-link-btn:hover {
    background-color: #333333;
}

.logout-btn:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    justify-content: center;
    padding: 5px;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    transition: var(--transition);
}

/* ==========================================================================
   Flash Messages & Alerts
   ========================================================================== */

.flash-message-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 20px auto 30px;
    padding: 0 20px;
}

.flash-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    animation: fadeInDown 0.3s ease-out;
    border: 1px solid transparent;
}

.flash-success {
    background-color: var(--success-light);
    color: var(--success);
    border-color: rgba(22, 163, 74, 0.2);
}

.flash-error {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: rgba(225, 29, 72, 0.2);
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(225, 29, 72, 0.15);
}

/* ロックアウト専用アラート */
.lockout-alert {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 4px solid var(--danger);
    padding-left: 16px;
}

.lockout-countdown {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    padding-top: 6px;
    border-top: 1px solid rgba(225, 29, 72, 0.15);
}

.lockout-countdown strong {
    color: var(--danger);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background-color: rgba(0,0,0,0.02);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-secondary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(0, 102, 204, 0.15);
}

/* ==========================================================================
   Auth Forms (Login / Register)
   ========================================================================== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.auth-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background-color: #ffffff;
    color: #000000;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.form-input.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
}

.auth-submit {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    margin-left: 5px;
}

.auth-link-block {
    display: block;
    margin: 0 0 14px;
}

.auth-link:hover {
    text-decoration: underline;
}

.reset-success-box {
    text-align: center;
}

.reset-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 50%;
    background-color: var(--success-light);
    color: var(--success);
}

.reset-error-icon {
    background-color: var(--danger-light);
    color: var(--danger);
}

.reset-success-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.reset-success-text {
    font-size: 14px;
    color: var(--text-muted);
}

.debug-box {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 159, 10, 0.25);
    border-radius: var(--radius-sm);
    background-color: var(--warning-light);
    color: var(--text-muted);
    font-size: 13px;
    text-align: left;
}

.debug-box code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

/* ==========================================================================
   Dashboard, Search & Controls
   ========================================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.controls-bar {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.search-filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.search-icon-wrapper {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background-color: #ffffff;
    color: #000000;
    cursor: pointer;
    min-width: 130px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================================================
   Clips Grid & Cards (Pocket-style)
   ========================================================================== */

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.clips-empty {
    grid-column: 1 / -1;
    background-color: var(--card-bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 60px 20px;
    text-align: center;
}

.clips-empty-icon {
    color: var(--text-light);
    margin-bottom: 15px;
}

.clips-empty-text {
    font-size: 16px;
    font-weight: 550;
    color: var(--text-muted);
}

.clip-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.01);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    position: relative;
}

.clip-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--border-hover);
}

.clip-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.clip-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
}

.clip-domain {
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

.clip-date {
    color: var(--text-light);
}

.clip-title-link {
    color: var(--text);
    margin-bottom: 12px;
    display: inline-block;
}

.clip-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clip-title-link:hover .clip-title {
    color: var(--primary);
}

.clip-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.clip-memo {
    background-color: var(--bg);
    border-left: 3px solid var(--text-light);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 15px;
}

.clip-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin-top: auto;
}

.tag-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.tag-badge:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.clip-card-footer {
    border-top: 1px solid var(--border);
    background-color: #fafafa;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clip-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.clip-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.clip-action-btn:hover {
    color: var(--text);
    background-color: var(--bg);
}

.clip-action-btn.active {
    color: #d4af37; /* Gorgeous Gold */
}

.clip-action-btn.is-read {
    color: var(--success);
}

.clip-action-btn.is-unread {
    color: var(--text-light);
}

.clip-actions-right {
    display: flex;
    gap: 8px;
}

.clip-edit-link, .clip-delete-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.clip-edit-link {
    color: var(--primary);
}

.clip-edit-link:hover {
    background-color: var(--primary-light);
}

.clip-delete-btn {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
}

.clip-delete-btn:hover {
    background-color: var(--danger-light);
}

/* ==========================================================================
   Tags Manager Page & Add URL Page
   ========================================================================== */

.content-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.tag-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.tag-count {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
}

.tag-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    display: flex;
    align-items: center;
}

.tag-delete-btn:hover {
    color: var(--danger);
}

/* Save Form Details */
.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ==========================================================================
   Landing Page (Index) & Bookmarklet Page
   ========================================================================== */

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 500;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
}

.hero-btn {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.feature-icon-wrapper {
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* Bookmarklet card */
.bookmarklet-box {
    text-align: center;
    background-color: var(--bg);
    border: 2px dashed var(--border);
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.bookmarklet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: bold;
    cursor: grab;
    user-select: none;
    box-shadow: var(--shadow-md);
    font-size: 15px;
    margin-bottom: 20px;
}

.bookmarklet-btn:active {
    cursor: grabbing;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 60px;
}

.footer-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .hero-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    /* Responsive Header & Navigation Drawer */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: var(--header-height);
        left: 0;
        background-color: var(--card-bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        animation: fadeInDown 0.2s ease-out;
    }

    .main-nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        padding: 20px;
        align-items: stretch;
        gap: 8px;
    }

    .nav-link {
        padding: 12px;
        font-size: 15px;
    }

    .nav-link-btn {
        text-align: center;
        margin-top: 10px;
    }

    .logout-btn {
        margin-top: 10px;
    }

    /* Adjust main controls */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .search-filter-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .clips-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 24px;
    }
}

/* ==========================================================================
   Thumbnails & screenshot styles (Pocket-style)
   ========================================================================== */

.clip-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.clip-thumbnail-link {
    display: block;
    width: 100%;
    height: 100%;
}

.clip-thumbnail-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    user-select: none;
    letter-spacing: -2px;
    z-index: 0;
}

/* 6種のプレミアム線形グラデーション (ドメインごとに自動割り当て) */
.bg-gradient-1 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.bg-gradient-2 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.bg-gradient-3 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.bg-gradient-4 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.bg-gradient-5 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.bg-gradient-6 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }

/* AIブランド専用プレミアムグラデーション */
.bg-gradient-gemini { background: linear-gradient(135deg, #7a9cff 0%, #c47dff 50%, #ffd07d 100%); }
.bg-gradient-chatgpt { background: linear-gradient(135deg, #0f8f74 0%, #10a37f 100%); }
.bg-gradient-claude { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.bg-gradient-ai-note { background: linear-gradient(135deg, #e50914 0%, #b91c1c 100%); }

/* AIドメインの特別バッジデザイン */
.clip-domain.gemini-google-com {
    background-color: rgba(122, 156, 255, 0.08) !important;
    color: #4a75e6 !important;
    border: 1px solid rgba(122, 156, 255, 0.3) !important;
}
.clip-domain.chatgpt-com {
    background-color: rgba(16, 163, 127, 0.08) !important;
    color: #0d8265 !important;
    border: 1px solid rgba(16, 163, 127, 0.3) !important;
}
.clip-domain.claude-ai {
    background-color: rgba(217, 119, 6, 0.08) !important;
    color: #b45309 !important;
    border: 1px solid rgba(217, 119, 6, 0.3) !important;
}
.clip-domain.ai-note {
    background-color: rgba(229, 9, 20, 0.08) !important;
    color: #c90812 !important;
    border: 1px solid rgba(229, 9, 20, 0.3) !important;
}

.clip-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.clip-thumbnail.is-loaded {
    opacity: 1;
}

/* Hover Zoom effect */
.clip-card:hover .clip-thumbnail {
    transform: scale(1.06);
}

/* お気に入りクリック時のプルンプルンとしたスプリングアニメーション */
@keyframes popSpring {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    50% { transform: scale(0.85); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.clip-action-btn.active svg {
    animation: popSpring 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ==========================================================================
   User Input Highlights & Accordion Details (Save Page UX)
   ========================================================================== */

.user-input-highlight-box {
    background-color: rgba(229, 9, 20, 0.04); /* 極めて淡く洗練された真紅のニュアンス背景 */
    border: 1px solid rgba(229, 9, 20, 0.15); /* 非常に繊細で上品なレッドの極細枠線 */
    border-radius: var(--radius-lg); /* ゆったりと現代的な16pxの角丸 */
    padding: 24px 28px; /* 横の余白を少し広げて優雅なレイアウトに */
    margin: 28px 0;
    box-shadow: 0 10px 30px -15px rgba(229, 9, 20, 0.15), 0 4px 12px -5px rgba(229, 9, 20, 0.05); /* 滑らかに広がるプレミアムな影 */
}

.highlight-box-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.highlight-label {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: var(--text) !important;
}

.highlight-input {
    background-color: #ffffff !important;
    border-color: var(--border) !important;
    color: #000000 !important;
}

.highlight-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.2) !important;
}

/* Details Accordion Styles */
.auto-metadata-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    overflow: hidden;
    background-color: #ffffff;
    transition: var(--transition);
}

.auto-metadata-details[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.auto-metadata-summary {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: #f8fafc;
    cursor: pointer;
    user-select: none;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    outline: none;
    list-style: none; /* デフォルトの三角形を消す */
}

/* サファリ等のブラウザデフォルト三角形を消す */
.auto-metadata-summary::-webkit-details-marker {
    display: none;
}

.auto-metadata-summary:hover {
    color: var(--text);
    background-color: #f1f5f9;
}

.summary-icon {
    font-size: 16px;
    margin-right: 8px;
}

.summary-text {
    flex: 1;
}

.summary-toggle-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-right: 4px;
}

.auto-metadata-details[open] .summary-toggle-arrow {
    transform: rotate(-135deg);
}

.details-content-inner {
    padding: 24px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ==========================================================================
   Premium Landing Page (index.php) Styles
   ========================================================================== */

.landing-wrapper {
    position: relative;
    padding: 60px 0 100px;
    overflow: hidden;
    font-family: 'Outfit', 'Inter', 'Noto Sans JP', sans-serif;
}

/* 背景の発光オーブ */
.landing-wrapper::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.12) 0%, rgba(229, 9, 20, 0.02) 70%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
    border-radius: 50%;
}

.hero {
    max-width: 900px;
    margin: 0 auto 90px;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-size: 54px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 24px;
}

.hero-title span {
    background: linear-gradient(135deg, #e50914 0%, #ff1e27 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
    font-weight: 500;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 85, 255, 0.15);
}

.hero-btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 85, 255, 0.25);
}

.hero-btn.btn-outline {
    border: 2px solid var(--border);
    color: var(--text);
    box-shadow: none;
}

.hero-btn.btn-outline:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-3px);
}

/* 超美麗なデモモックアップ */
.demo-mockup-container {
    max-width: 1280px;
    margin: 0 auto 90px;
    padding: 0 40px;
    perspective: 1000px;
}

.demo-mockup-window {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.01);
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-mockup-window:hover {
    transform: translateY(-5px) rotateX(1deg);
}

.window-header {
    background-color: #f1f5f9;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.window-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.window-address-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 40px;
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
    font-weight: 500;
}

.window-content-demo {
    padding: 30px;
    background-color: #f8f9fa;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* デモカードのスタイリング */
.demo-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.06);
    border-color: var(--border-hover);
}

.demo-card-image {
    width: 100%;
    height: 150px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.demo-card-body {
    padding: 24px;
}

.demo-card-domain {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.demo-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 12px;
}

.demo-card-tags {
    display: flex;
    gap: 6px;
}

.demo-tag {
    font-size: 10px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
}

/* 機能セクション */
.features-section {
    position: relative;
}

.features-section .feature-card {
    background-color: #ffffff;
    border: 1px solid var(--border);
    padding: 48px 36px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.features-section .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 85, 255, 0.04);
    border-color: var(--primary-light);
}

.features-section .feature-icon-wrapper {
    color: var(--primary);
    background-color: var(--primary-light);
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.4s ease;
}

.features-section .feature-card:hover .feature-icon-wrapper {
    background-color: var(--primary);
    color: #ffffff;
    transform: scale(1.05) rotate(5deg);
}

/* ==========================================================================
   Action SVG Buttons Styles (Unifying & Premiumizing)
   ========================================================================== */

/* アクションボタン共通設定 */
.clip-edit-link.clip-action-btn:hover {
    color: var(--primary) !important;
    background-color: var(--primary-light) !important;
}

.clip-delete-btn.clip-action-btn {
    color: var(--text-light);
}

.clip-delete-btn.clip-action-btn:hover {
    color: var(--danger) !important;
    background-color: var(--danger-light) !important;
}

/* タグ削除ボタン */
.tag-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0 !important;
}

.tag-delete-btn:hover {
    background-color: var(--danger-light);
    color: var(--danger);
    transform: rotate(90deg);
}

/* 各タグカードのレイアウト最適化 */
.tag-card {
    padding: 10px 16px;
    align-items: center;
}

.tag-card a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}

.tag-card a:hover {
    color: var(--primary);
}

/* タグ自動サジェストボックス & バッジ */
.tag-suggestions-box {
    display: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    user-select: none;
}

.suggestion-badge:hover {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.2);
}
