/* Lexindex - Core Dictionary Styling */
:root {
    /* Lexindex Theme Colors */
    --lexindex-primary: #5FCAFF;
    --lexindex-secondary: #F59E0B;
    --lexindex-success: #70ffa0;
    --lexindex-warning: #FFB347;
    --lexindex-danger: #FF7B7B;
    --lexindex-purple: #A855F7;
    
    /* Admin theme base */
    --admin-bg: #030712;
    --admin-card: rgba(17, 24, 39, 0.7);
    --admin-border: rgba(59, 130, 246, 0.15);
    --admin-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.4), 0 4px 10px -2px rgba(0, 0, 0, 0.3), 0 0 1px rgba(59, 130, 246, 0.15);
    
    /* Layout */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

html, body {
    width: 100vw;
    height: 100vh;
    background: #00000F;
    overflow-x: hidden;
    color: #ffffff;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Background Canvas */
.stars, .fireflies, .fireflies-front {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.stars { z-index: 0; }
.fireflies { z-index: 1; }
.fireflies-front { z-index: 2; }

/* Layout Structure */
.page-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.side-margin-left, .side-margin-right {
    width: 30vw;
    background-color: #00000F;
    flex-shrink: 0;
}

.main-container {
    position: relative;
    z-index: 10;
    flex: 1;
    width: 40vw;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Component - 20% transparency and 3px blur */
.card {
    background-color: rgba(15, 15, 40, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Button Base Styles */
.btn {
    padding: 9px 15px;
    border: 1px solid;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    height: 35px;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background-color: transparent;
}

.btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn:disabled:hover {
    box-shadow: none;
}

/* Button Color Variants */
.btn-favorites {
    background-color: rgba(112, 255, 160, 0.1);
    border-color: rgba(112, 255, 160, 0.3);
    color: var(--lexindex-success);
    width: 43px;
    height: 35px;
    font-size: 15px;
}

.btn-favorites:hover {
    background-color: rgba(112, 255, 160, 0.2);
    border-color: rgba(112, 255, 160, 0.5);
    box-shadow: 0 4px 12px rgba(112, 255, 160, 0.3);
}

.btn-hub {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 43px;
    height: 35px;
}

.btn-hub:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-search {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    font-size: 20px;
    padding: 9px 21px;
    width: 100%;
    height: 47px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.btn-search:hover {
    background-color: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.8);
    color: #93c5fd;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.btn-add-fav {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--lexindex-secondary);
}

.btn-add-fav:hover {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-pronunciation {
    background-color: rgba(95, 202, 255, 0.1);
    border-color: rgba(95, 202, 255, 0.3);
    color: var(--lexindex-primary);
}

.btn-pronunciation:hover {
    background-color: rgba(95, 202, 255, 0.2);
    border-color: rgba(95, 202, 255, 0.5);
    box-shadow: 0 4px 12px rgba(95, 202, 255, 0.3);
}

.btn-close {
    background-color: rgba(95, 202, 255, 0.1);
    border-color: rgba(95, 202, 255, 0.3);
    color: var(--lexindex-primary);
}

.btn-close:hover {
    background-color: rgba(95, 202, 255, 0.2);
    border-color: rgba(95, 202, 255, 0.5);
    box-shadow: 0 4px 12px rgba(95, 202, 255, 0.3);
}

.btn-clear-all {
    background-color: rgba(255, 123, 123, 0.1);
    border-color: rgba(255, 123, 123, 0.3);
    color: var(--lexindex-danger);
}

.btn-clear-all:hover {
    background-color: rgba(255, 123, 123, 0.2);
    border-color: rgba(255, 123, 123, 0.5);
    box-shadow: 0 4px 12px rgba(255, 123, 123, 0.3);
}

.btn-refresh {
    background-color: rgba(95, 202, 255, 0.1);
    border-color: rgba(95, 202, 255, 0.3);
    color: var(--lexindex-primary);
    font-size: 13px;
    font-weight: 600;
}

.btn-refresh:hover {
    background-color: rgba(95, 202, 255, 0.2);
    border-color: rgba(95, 202, 255, 0.5);
    box-shadow: 0 4px 12px rgba(95, 202, 255, 0.3);
}

/* Input Styles - 20% transparency and 3px blur */
.search-input {
    width: 100%;
    padding: 15px;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    background-color: rgba(15, 15, 40, 0.3);
    color: #FFFFFF;
    margin-bottom: 15px;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: rgba(17, 24, 39, 0.9);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Text Color Classes */
.word-text { 
    color: #e35be7; 
    font-size: 20px; 
    font-weight: 600; 
}

.pos-text { 
    color: #53eea1; 
    font-size: 20px; 
    font-weight: 600; 
}

.pronunciation-text { 
    color: var(--lexindex-warning); 
    font-size: 18px; 
}

.turkish-text { 
    color: var(--lexindex-secondary); 
    font-size: 18px; 
}

.definition-text { 
    color: #FFFFFF; 
    font-size: 17px; 
}

.example-text { 
    color: rgba(255, 255, 255, 0.85); 
    font-size: 17px; 
    font-style: italic; 
}

/* Status Text */
.status-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    padding: 20px;
    line-height: 1.6;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #00000F;
}

::-webkit-scrollbar-thumb {
    background: var(--admin-border);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Universal Font Override */
*, *::before, *::after {
    font-family: 'Segoe UI', Arial, sans-serif;
}

input, textarea, select, button {
    font-family: 'Segoe UI', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Arial, sans-serif;
}

p, span, div, a, label {
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* HEADER SECTION - 20% transparency and 3px blur */
.header-wrap {
    text-align: center;
    margin-bottom: 0;
    padding: 21px 0;
    background: rgba(15, 15, 40, 0.3);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    position: relative;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* COPYRIGHT HEADER */
.copyright-header {
    text-align: center;
    padding: 10px 0;
    background: rgba(15, 15, 40, 0.3);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    margin-bottom: 0;
}

.copyright-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #fbbf24;
}

/* TOP NAVIGATION HEADER */
.top-navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    background: rgba(15, 15, 40, 0.3);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    position: relative;
    z-index: 20;
}

/* Home Button - Inside top navigation */
.top-navigation-header .home-btn {
    position: static;
    background: rgba(15, 15, 40, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 35px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    margin-left: 20px;
}

.top-navigation-header .home-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.top-navigation-header .home-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.top-navigation-header .home-btn:hover .home-icon {
    color: #3B82F6;
}



/* Favorites Button - Inside top navigation */
.top-navigation-header .btn-favorites {
    margin-right: 20px;
}

/* Title Logo - perfectly centered */
.title-logo {
    max-width: 224px;
    width: 100%;
    height: auto;
    margin: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: block;
}

.copyright {
    font-size: 0.8125rem;
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0.9;
}

/* Header Top Right */
.header-buttons-top {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* SEARCH SECTION */
.search-section {
    padding: 0;
    background: transparent;
    border: none;
}

/* WORD OVERVIEW SECTION */
.word-overview-section {
    margin-bottom: 0;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.overview-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.overview-buttons .btn {
    flex: 1;
    min-width: 120px;
    white-space: nowrap;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-box {
    background-color: rgba(3, 7, 18, 0.8);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--admin-border);
    box-shadow: 0 0 1px var(--admin-border);
}

.info-box.full-width {
    grid-column: 1 / -1;
    text-align: left;
}

.field-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--lexindex-primary);
    margin-bottom: 5px;
}

.field-value {
    font-size: 17px;
    line-height: 1.4;
}

/* DETAILS SECTION */
.details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-card {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.detail-header {
    text-align: center;
    padding: 15px;
    font-size: 20px;
    font-weight: 600;
    color: var(--lexindex-primary);
}

.detail-content {
    background-color: rgba(3, 7, 18, 0.8);
    margin: 0 15px 15px 15px;
    border-radius: var(--border-radius);
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 0 1px var(--admin-border);
}

.detail-item {
    background-color: rgba(3, 7, 18, 0.6);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 0 1px var(--admin-border);
}

.detail-item:last-child {
    margin-bottom: 0;
}

.section-header {
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    height: 60px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--lexindex-primary);
}

.section-box {
    padding: 9px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    height: 35px;
    line-height: 1;
    box-sizing: border-box;
    transition: var(--transition);
    border: 1px solid;
    background-color: transparent;
}

/* SECTION COLORS */
.etymology-header { 
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--lexindex-secondary);
}

.definitions-header { 
    background-color: rgba(95, 202, 255, 0.1);
    border-color: rgba(95, 202, 255, 0.3);
    color: var(--lexindex-primary);
}

.examples-header { 
    background-color: rgba(255, 179, 71, 0.1);
    border-color: rgba(255, 179, 71, 0.3);
    color: var(--lexindex-warning);
}

.synonyms-header { 
    background-color: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--lexindex-purple);
}

.antonyms-header { 
    background-color: rgba(255, 123, 123, 0.1);
    border-color: rgba(255, 123, 123, 0.3);
    color: var(--lexindex-danger);
}

/* SECTION BOX HOVER EFFECTS */
.etymology-header:hover {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

.definitions-header:hover {
    background-color: rgba(95, 202, 255, 0.2);
    border-color: rgba(95, 202, 255, 0.5);
}

.examples-header:hover {
    background-color: rgba(255, 179, 71, 0.2);
    border-color: rgba(255, 179, 71, 0.5);
}

.synonyms-header:hover {
    background-color: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.5);
}

.antonyms-header:hover {
    background-color: rgba(255, 123, 123, 0.2);
    border-color: rgba(255, 123, 123, 0.5);
}

/* TURKISH ALTERNATIVES */
.turkish-alternatives {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.turkish-alternative {
    background-color: var(--lexindex-secondary);
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.turkish-alternative:hover {
    background-color: #D97706;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* SELECTABLE TEXT */
.selectable {
    -webkit-user-select: text !important;
    -khtml-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    cursor: text;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .side-margin-left, .side-margin-right {
        width: 25vw;
    }
    
    .main-container {
        width: 50vw;
    }
}

@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }
    
    .side-margin-left, .side-margin-right {
        display: none;
    }
    
    .main-container {
        width: 100vw;
        padding: 15px;
    }
    
    .top-navigation-header {
        padding: 10px 0;
    }
    
    .top-navigation-header .home-btn {
        width: 43px;
        height: 35px;
        padding: 5px;
        margin-left: 15px;
    }
    
    .top-navigation-header .home-icon {
        width: 18px;
        height: 18px;
    }
    
    .top-navigation-header .btn-favorites {
        margin-right: 15px;
    }
    
    .copyright-header {
        padding: 8px 0;
        margin-bottom: 0;
    }
    
    .copyright-text {
        font-size: 0.75rem;
    }
    
    .header-wrap {
        margin-bottom: 0;
        padding: 13px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .title-logo {
        max-width: 140px;
    }
    
    .copyright {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .header-buttons-top {
        top: 15px;
        right: 15px;
        gap: 6px;
    }
    
    /* Mobile optimization: WORD OVERVIEW title 30% smaller */
    .section-title {
        font-size: 15.4px; /* 22px * 0.7 = 15.4px */
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .overview-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .top-navigation-header {
        padding: 8px 0;
    }
    
    .top-navigation-header .home-btn {
        width: 43px;
        height: 35px;
        padding: 4px;
        margin-left: 12px;
    }
    
    .top-navigation-header .home-icon {
        width: 16px;
        height: 16px;
    }
    
    .top-navigation-header .btn-favorites {
        margin-right: 12px;
    }
    
    .copyright-header {
        padding: 6px 0;
        margin-bottom: 0;
    }
    
    .copyright-text {
        font-size: 0.7rem;
    }
    
    .header-wrap {
        padding: 10px 8px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .title-logo {
        max-width: 168px;
    }
    
    .copyright {
        font-size: 0.7rem;
    }
    
    .header-buttons-top {
        top: 12px;
        right: 12px;
    }
}
