:root {
    --primary: #9b59b6;
    --secondary: #3498db;
    --dark: #222;
    --light: #f5f5f5;
    --accent: #e74c3c;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, #333 100%);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    padding: 30px;
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.highlight {
    color: var(--accent);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.8;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 700;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: var(--light);
}

button {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    user-select: none;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.result-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.2rem;
    min-height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.copy-container {
    display: flex;
    justify-content: center;
}

.translator-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.translator-column {
    flex: 1;
}

textarea {
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
}

.translate-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#dictionary-search {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
}

.dictionary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.dictionary-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dictionary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.dictionary-term {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.dictionary-definition {
    font-size: 0.9rem;
    opacity: 0.9;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.emoji {
    font-size: 1.2rem;
    display: inline-block;
    margin: 0 3px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .translator-container {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .dictionary-list {
        grid-template-columns: 1fr;
    }
}

/* New styles for the generator controls */
.generator-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

/* Fix for dropdown menu styling - making it readable */
select {
    background-color: rgba(30, 30, 30, 0.9) !important; /* Dark background */
    border: 1px solid rgba(155, 89, 182, 0.5); /* Purple border */
    border-radius: 30px;
    color: var(--light) !important; /* Light text */
    padding: 10px 15px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239b59b6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Style for dropdown options */
select option {
    background-color: #333 !important; /* Dark background for options */
    color: white !important; /* Light text for options */
    padding: 10px;
}

/* Override any browser-specific styling */
select::-ms-expand {
    display: none; /* Remove default arrow in IE */
}

/* Ensure dropdown items are visible on focus/hover */
select:focus, select:hover {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.3);
}

/* Translation intensity selector */
.translate-controls select {
    min-width: 150px;
}

/* Comprehensive Glossary styles */
.glossary-intro {
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.glossary-controls {
    margin-bottom: 30px;
}

#glossary-search {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.alphabet-nav button {
    padding: 5px 10px;
    margin: 0;
    min-width: 35px;
    font-size: 0.9rem;
}

.alphabet-nav button:hover {
    background: var(--primary);
}

.glossary-letter {
    margin: 30px 0 15px;
    font-size: 2.5rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    color: var(--primary);
    scroll-margin-top: 30px;
}

.glossary-term {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.glossary-term h3 {
    color: var(--secondary);
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.glossary-term p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.glossary-term .pronunciation {
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 8px;
}

.glossary-term .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.glossary-term .tag {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 0.8rem;
    background: rgba(155, 89, 182, 0.3);
    color: white;
    margin: 2px;
    display: inline-block;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* Dictionary View Toggle */
.dictionary-controls {
    margin-bottom: 30px;
}

.view-toggle {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.view-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--primary);
}

@media (max-width: 768px) {
    .translator-container {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .dictionary-list {
        grid-template-columns: 1fr;
    }
    
    .alphabet-nav {
        gap: 3px;
    }
    
    .alphabet-nav button {
        min-width: 30px;
        padding: 3px 5px;
    }
    
    .glossary-letter {
        font-size: 2rem;
    }
}

/* Adding styles for enhanced generator and translator features */

/* Enhanced notification styles */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
    font-weight: 700;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Enhanced result styles */
.result-box p {
    line-height: 1.7;
}

/* Style for hashtags in social posts */
.social-hashtags {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Translation intensity selector styling */
.translation-intensity-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Dictionary fixes */
#dictionary-list-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    opacity: 1 !important;
}

#dictionary-glossary-view {
    opacity: 1 !important;
}

/* Force show content */
.result-box, #dictionary-views {
    opacity: 1 !important;
}

/* Dictionary item hover effect */
.dictionary-item {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.dictionary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}
