
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "pixel operator", sans-serif;
    font-size:20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url("/media/bg/moonstarbg.jpg");
    background-size:200px;
    background-attachment: fixed;
    background-repeat:repeat;
    min-height: 100vh;
    color: #000;
    cursor: crosshair;
    scrollbar-color: lightpink transparent;
    scrollbar-width:thin;
}


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    color: black;
    font-weight:bold;
    font-family: "pixel operator", sans-serif;
    letter-spacing:1px;
    font-size: 2.5rem;
    text-shadow: 3px 2px 4px rgba(238,155,255,0.9);
    margin-bottom: 10px;
    text-align:center;
}

h1 {
    color: #EE7AE9;
    background-color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

mark { 
  background-color: #FFE1FF;
  color: black;
}

.nav {
padding-right:5px;
}

.nav a {
color:grey;
font-weight:bold;
background-color: rgba(239,165,255,0.2);
  transition-duration: 0.4s;
}

.nav a:hover {
color:black;
background-color: rgba(239,165,255,0.4);
}

.search-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

#searchInput {
    width: 100%;
    padding: 5px 10px;
    font-size: 1.2rem;
    font-family: "pixel operator", sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-stats {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#resultCount {
    color: #666;
    font-size: 0.9rem;
}

.content-section {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height:490px;
}

.definitions-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height:455px;
    padding:10px;
    overflow-x:hidden;
    overflow-y:scroll;
}

.definition-card {
    background: #f8f9ff;
    border: 1px solid #e0e6ff;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-in;
}

.definition-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.definition-card h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #BFEFFF;
    padding-bottom: 5px;
}

.definition-card .category {
    display: inline-block;
    background: #BFEFFF;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight:bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correspondences {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.correspondence-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.correspondence-label {
    font-weight: bold;
    color: #4a5568;
    min-width: 100px;
}

.correspondence-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.correspondence-tag:hover {
    background: #cbd5e0;
    transform: scale(1.05);
}

.correspondence-tag.highlight {
    background: #FFE1FF;
    color: #000;
    font-weight: bold;
}

.description {
    color: #666;
    font-style: italic;
    float: right;
    font-size:0.8em;
}

.description mark {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

.no-results {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px;
}

.filters-container {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 5px;
    padding: 5px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9em;
    color: #495057;
}

.filter-group select {
    padding: 2px 4px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 0.6em;
}

.clear-filters-btn {
    padding: 2px 4px;
    background-color: rgba(239,165,255,0.2);
    color: grey;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7em;
    align-self: flex-end;
}

.clear-filters-btn:hover {
    background-color: rgba(239,165,255,0.4);
}

.footer {
    padding: 3px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top:5px;
    text-align:center;
    }
    
     .popup {
            display: none;
            position: fixed;
            text-align:center;
            max-height:300px;
            overflow-x:hidden;
            overflow-y:scroll;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255,255,255);
            padding: 20px;
            border: 2px solid #ccc;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
            z-index: 1000;
        }
        
        .overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 999;
        }
 
button {
font-family: "pixel operator", sans-serif;
color:grey;
font-weight:bold;
font-size:20px;
text-decoration:underline;
border:none;
background-color: rgba(239,165,255,0.2);
  transition-duration: 0.4s;
}

button:hover {
color:black;
background-color: rgba(239,165,255,0.4);
}
 
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        font-size: 1.5rem;
    }
    
    .search-section,
    .content-section {
        padding: 20px;
    }
    
    .correspondence-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .correspondence-label {
        min-width: auto;
    }
    
        .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clear-filters-btn {
        align-self: stretch;
    }

}

@media (max-width: 480px) {
    header {
        font-size: 1.2rem;
    }
    
    .search-section,
    .content-section {
        padding: 10px;
    }
    
    .definition-card {
        padding: 10px;
    }
}
