/* Base Styles from Warikan Demo */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #2d3748;
    --heading-color: #1a202c;
    --card-bg: rgba(255, 255, 255, 0.95);
    --primary-gradient: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    --accent-color: #43e97b;
    --accent-gradient: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
    --border-radius: 16px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-image: var(--bg-gradient);
    background-color: #f5f7fa;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 15px;
    flex: 1;
}

h1 {
    text-align: center;
    color: var(--heading-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.description {
    text-align: center;
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Card & Inputs */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--heading-color);
    font-size: 0.9rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #f8fafc;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-bottom: 15px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4facfe;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: white;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 6px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 7px 14px rgba(79, 172, 254, 0.4);
    transform: translateY(-2px);
}

/* Bookmark List Styles (View Page) */
.bookmark-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bookmark-btn {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.bookmark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #4facfe;
}

.bm-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.bm-info {
    flex: 1;
    overflow: hidden;
}

.bm-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bm-desc {
    font-size: 0.8rem;
    color: #718096;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Edit/Create Interface */
.edit-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
}

.edit-item.dragging {
    opacity: 0.5;
    border: 2px dashed #4facfe;
}

.handle {
    cursor: move;
    color: #cbd5e0;
    margin-right: 10px;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fed7d7;
    color: #c53030;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
}

.btn-remove i {
    pointer-events: none;
}

/* Footer (Copied largely from Warikan) */
.site-footer {
    margin-top: auto;
    padding: 20px 20px 10px;
    text-align: center;
    width: 100%;
}

.footer-message {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 15px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #a0aec0;
}

.footer-logo {
    height: 75px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.copyright {
    color: #4a5568;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.copyright a {
    color: inherit;
    text-decoration: none;
}

.sp-br {
    display: none;
}

@media (max-width: 768px) {
    .sp-br {
        display: inline;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}