/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #4a5568;
    font-size: 2rem;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

/* Section Styles */
.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.input, .select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.input:focus, .select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Words Grid */
.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.word-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.word-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.word-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.word-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.word-category {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.word-actions {
    display: flex;
    gap: 8px;
}

.word-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
}

.word-meaning {
    color: #4a5568;
    margin-bottom: 10px;
    font-style: italic;
}

.word-hindi {
    color: #718096;
    font-size: 14px;
    margin-bottom: 10px;
}

.word-synonyms {
    margin-bottom: 10px;
}

.word-synonyms h5 {
    font-size: 12px;
    color: #718096;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.synonym-tag {
    display: inline-block;
    background: #edf2f7;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 2px;
}

.word-examples {
    font-size: 13px;
    color: #718096;
}

.word-examples h5 {
    font-size: 12px;
    color: #718096;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.example-item {
    margin-bottom: 3px;
    padding-left: 10px;
    border-left: 2px solid #e2e8f0;
}

/* Flashcard Styles */
.flashcard-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flashcard-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
}

.flashcard-mode-toggle input[type="checkbox"] {
    margin: 0;
}

.priority-select {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    background: white;
    margin-right: 8px;
}

.priority-select:focus {
    outline: none;
    border-color: #667eea;
}

.flashcard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.flashcard {
    width: 400px;
    height: 500px;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s ease;
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.flashcard-back {
    background: white;
    color: #333;
    transform: rotateY(180deg);
    overflow-y: auto;
}

.flashcard.flipped .flashcard-front {
    transform: rotateY(-180deg);
}

.flashcard.flipped .flashcard-back {
    transform: rotateY(0deg);
}

.flashcard-front h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.card-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.card-meaning {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.card-meaning h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-synonyms {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.card-synonyms h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-examples {
    text-align: left;
    width: 100%;
}

.card-dictionary {
    margin-top: 20px;
    text-align: left;
    width: 100%;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding-top: 15px;
}

.card-dictionary h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
}

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

.priority-indicator {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-examples h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-examples ul {
    list-style: none;
    padding: 0;
}

.card-examples li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.card-examples li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

.flip-btn {
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #f56565;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 15px 30px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.file-input {
    width: 100%;
    padding: 15px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.import-info {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.import-info pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    margin-top: 10px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .words-grid {
        grid-template-columns: 1fr;
    }
    
    .flashcard {
        width: 320px;
        height: 450px;
    }
    
    .flashcard-front h3 {
        font-size: 2rem;
    }
    
    .flashcard-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
} 