* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    gap: 2rem;
}

.controls-panel {
    flex: 1;
    min-width: 300px;
}

.display-panel {
    flex: 2;
    min-width: 500px;
}

.filter-section, .search-section, .active-filters {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

h2, h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.category-btn {
    padding: 10px 20px;
    background-color: #e9ecef;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: #4dabf7;
    color: white;
    box-shadow: 0 4px 6px rgba(77, 171, 247, 0.3);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#deviceSearch {
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#deviceSearch:focus {
    outline: none;
    border-color: #4dabf7;
}

.custom-select {
    position: relative;
}

#deviceSelect {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    background-color: white;
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.selection-display {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.selection-display span {
    background-color: #e7f5ff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.device-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
}

.card-header {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 1.5rem;
}

.category-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-header h2 {
    color: white;
    margin: 10px 0 0 0;
    font-size: 2rem;
}

.card-content {
    padding: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    color: #2d3436;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.example-text, .effect-text {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #74b9ff;
    font-size: 1.3rem;
    line-height: 1.6;
}

.example-text {
    font-style: italic;
    color: #2d3436;
}

.effect-text {
    color: #2d3436;
}

.card-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    padding: 10px 20px;
    background-color: #4dabf7;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background-color: #339af0;
}

.nav-btn:disabled {
    background-color: #ced4da;
    cursor: not-allowed;
}

#deviceCount {
    font-weight: 500;
    color: #495057;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .controls-panel, .display-panel {
        min-width: 100%;
    }
}
/* Add these styles to your existing CSS */

.example-text, .effect-text {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #74b9ff;
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-line; /* This preserves line breaks */
}

/* Style for bold text within examples */
.example-text strong {
    color: #2575fc;
    font-weight: 700;
}

strong {
    color: #2575fc;
    font-weight: 700;
}

/* Style for device names with pronunciation */
.device-name-pronunciation {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
}

/* Make sure the text displays HTML properly */
.example-text, .effect-text {
    overflow-wrap: break-word;
}
/* Add to your existing CSS */
.search-container {
    position: relative;
}

#deviceSearch {
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    width: 100%;
}

#deviceSearch:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

#deviceSearch::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Search results counter */
.search-results {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4dabf7;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Category buttons hover effect */
.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Active search highlight */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/************************************/


/* Style for formatted effects */
.effect-text ul, .effect-text ol {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.effect-text li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.effect-text strong {
    color: #2575fc;
    font-weight: 700;
}

/* Make sure the effect text also handles line breaks */
.effect-text {
    white-space: pre-line;
}


/************************************/


/* Fullscreen Button Styles */
.header-controls {
    position: fixed; /* Changed from absolute to fixed */
    top: 21px;
    right: 21px;
    z-index: 10000;
}

.fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.fullscreen-btn:hover {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Fullscreen mode - Body approach */
:fullscreen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: auto;
}

:-webkit-full-screen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: auto;
}

:-moz-full-screen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: auto;
}

:-ms-fullscreen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: auto;
}

/* Ensure content is visible and scrollable */
:fullscreen .container,
:-webkit-full-screen .container,
:-moz-full-screen .container,
:-ms-fullscreen .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}