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

:root {
    --primary-color: #2196F3;
    --premium-color: #FFD700;
    --premium-dark: #FFC107;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --header-bg: #ffffff;
    --footer-bg: #333333;
    --footer-text: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Page Content Styles */
.page-content h1 {
    color: #333;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.page-content h2 {
    color: #444;
    margin: 25px 0 15px;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content ul, .page-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-content li {
    margin-bottom: 8px;
}

/* About Page Styles */
.about-section {
    margin-bottom: 30px;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.team-member {
    flex: 1;
    min-width: 200px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-member h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.team-member p {
    color: #666;
    font-style: italic;
}

/* Contact Page Styles */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-info, .contact-form-section {
    flex: 1;
    min-width: 300px;
}

.contact-details {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-item h3 {
    margin-bottom: 5px;
    color: #444;
}

.contact-form {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0b7dda;
}

.faq-section {
    margin-top: 40px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: #333;
    margin-bottom: 10px;
}

/* Policy Content Styles */
.policy-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-content h2 {
    margin-top: 30px;
    color: #333;
}

.policy-content ul, .policy-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.policy-content li {
    margin-bottom: 10px;
}

/* Container for page content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.page-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Header Styles */
.main-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(33, 150, 243, 0.1);
}

/* Authentication Container */
.auth-container {
    display: flex;
    justify-content: flex-end;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    margin-bottom: 0;
}

#login-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-display {
    margin-right: 10px;
    font-weight: 500;
}

.auth-btn {
    padding: 6px 12px;
    border: 1px solid #2196F3;
    border-radius: 4px;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Main Content Area */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Footer Styles */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 0 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-section.contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    margin-top: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    color: var(--footer-text);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    text-align: center;
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 0.9rem;
}

.auth-btn:hover {
    background-color: #0b7dda;
    border-color: #0b7dda;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#logout-btn {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

#logout-btn:hover {
    background-color: #c82333;
    border-color: #c82333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background-color: #dee2e6;
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.mode-btn.premium-feature {
    position: relative;
}

.mode-btn.premium-feature::after {
    content: '⭐';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    color: var(--premium-color);
}

/* Premium Banner */
.premium-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f6f7f8 0%, #fff9e6 100%);
    border: 1px solid var(--premium-color);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.premium-info {
    flex: 1;
}

.premium-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.premium-features-list {
    list-style-type: none;
    margin: 10px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.premium-features-list li {
    position: relative;
    padding-left: 20px;
}

.premium-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.premium-price {
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    margin-top: 10px;
}

.premium-btn {
    background-color: var(--premium-color);
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.premium-btn:hover {
    background-color: var(--premium-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Premium Indicators */
.premium-indicator {
    background-color: var(--premium-color);
    color: #333;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.dictionary-toggle-container,
.language-selector-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #eaf2fd;
    border-radius: 4px;
}

.language-selector-container select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

/* Authentication Form Styling */
.auth-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.auth-submit:hover {
    background-color: #0b7dda;
}

.form-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.form-switch a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Payment Form Styling */
.subscription-details {
    margin-bottom: 20px;
}

.subscription-details p {
    margin-bottom: 10px;
}

.subscription-details ul {
    list-style-type: none;
    margin-left: 20px;
}

.subscription-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 5px;
}

.subscription-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
}

#card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

#card-errors {
    color: var(--error-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.payment-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--premium-color);
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.payment-submit:hover {
    background-color: var(--premium-dark);
}

/* Toggle Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#dictionary-label {
    font-weight: 600;
    min-width: 120px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #d1e6ff;
}

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

.input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

label {
    font-weight: 600;
}

input, select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

input[type="text"] {
    text-transform: uppercase;
}

.input-container input {
    width: 80px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.results-container {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
}

h2 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #2c3e50;
}

#results {
    line-height: 1.8;
    min-height: 50px;
    word-wrap: break-word;
}

.word-item {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.word-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.word-info {
    font-size: 14px;
    color: #6c757d;
}

.word-definition {
    font-size: 14px;
    color: #495057;
    margin-top: 5px;
    font-style: italic;
    display: none;
}

.vocabulary-mode .word-definition {
    display: block;
}

/* Usage Guide Styling */
.usage-guide-container {
    margin-top: 30px;
    background-color: #eaf2fd;
    padding: 40px 20px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.usage-guide-container h2 {
    text-align: center;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.usage-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.usage-category {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.usage-category h3 {
    color: #2196F3;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eaf2fd;
}

.usage-category ul {
    list-style-type: none;
}

.usage-category li {
    margin-bottom: 8px;
    padding-left: 5px;
    border-left: 3px solid #eaf2fd;
}

.usage-category strong {
    color: #2c3e50;
}

.usage-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.try-btn {
    background-color: #eaf2fd;
    color: #2196F3;
    border: 1px solid #d1e6ff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.try-btn:hover {
    background-color: #2196F3;
    color: white;
}

.try-btn.active {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

/* Responsive styles */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .filters-container {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .input-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    input, select {
        width: 100%;
    }
    
    button {
        width: 100%;
    }
    
    .dictionary-toggle-container,
    .language-selector-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .language-selector-container select {
        flex-grow: 1;
        min-width: 120px;
    }
    
    .usage-categories {
        grid-template-columns: 1fr;
    }
    
    .usage-category {
        margin-bottom: 15px;
    }
}