/* ---
  EnjoyWolfs Website - Common Stylesheet
--- */

/* Google Fonts & Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700&family=Roboto+Mono:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.8;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}
.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}
.back-link:hover { background-color: rgba(255, 255, 255, 0.3); }
header h1 { margin: 0; font-size: 2.5em; font-weight: 700; }

.controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.controls button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: white;
    cursor: pointer;
}
.controls button:hover { background: #5567c9; }
#search-box {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    min-width: 200px;
}

main { padding: 30px; }
.accordion-item { border-bottom: 1px solid #e0e0e0; }
.accordion-title {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: 700;
    transition: background-color 0.3s ease;
}
.accordion-title:hover { background-color: #f9f9f9; }
.accordion-title .icon { font-size: 1.5em; }
.accordion-item.active .accordion-title { background-color: #eef2ff; }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 20px;
    background-color: #fafafa;
}

.accordion-content dl { margin: 0; padding: 10px 0; }
.accordion-content dt {
    font-weight: bold;
    color: #4a4a4a;
    margin-top: 15px;
    padding: 8px 12px;
    background-color: #eef2ff;
    border-left: 4px solid #667eea;
}
.accordion-content dt:first-child { margin-top: 0; }
.accordion-content dd {
    margin-left: 0;
    padding: 10px 15px;
    border-bottom: 1px dashed #ddd;
}
.accordion-content dd:last-child { border-bottom: none; }
.accordion-content ul { padding-left: 20px; margin-top: 5px; }

.term-actions {
    display: inline-flex;
    gap: 5px;
    margin-left: 10px;
}
.term-actions button {
    padding: 2px 8px;
    border: 1px solid #667eea;
    border-radius: 4px;
    background-color: #fff;
    color: #667eea;
    cursor: pointer;
    font-size: 0.8em;
}
.term-actions button:hover { background-color: #eef2ff; }

footer { text-align: center; padding: 20px; font-size: 0.9em; color: #777; }

/* AI Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}
.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}
.modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.modal-close-btn:hover { color: #333; }
.modal-body .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.modal-body .response-content {
    font-size: 1rem;
    line-height: 1.8;
}
