.rws-container {
    /* max-width: 830px; */
    margin: 0 auto;
    padding: 15px 15px;
    background: #e8f0f5;
}

.rws-logo {
    text-align: center; 
}

.rws-logo-img {
    max-width: 100%;
    height: auto;
    display: inline-block;
        max-width: 351px;
        width: -webkit-fill-available;
}

.rws-form {
    background: transparent;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
}

.rws-field {
    margin-bottom: 15px;
    /* display: flex; */
    /* align-items: flex-start; */
    /* gap: 12px; */
}
#rws-form{
        margin: auto;
    max-width: 571px
}
#rws-form input
{    border-radius: 5px;}

.rws-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 15px;
    color: #333;
    flex-shrink: 0;
    min-width: 220px;
    padding-top: 4px;
}

.rws-label-green {
    color: #28a745;
}

.rws-label-orange {
    color: #ff8c00;
}

.rws-label-gray {
    color: #4a5568;
}

/* Icon squares */
.rws-label-green::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #28a745;
    border-radius: 3px;
    flex-shrink: 0;
}

.rws-label-orange::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #ff8c00;
    border-radius: 3px;
    flex-shrink: 0;
}

.rws-label-gray::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #4a5568;
    border-radius: 3px;
    flex-shrink: 0;
}

.rws-field > div {
    flex: 1;
}

.rws-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.rws-input {
    border: 2px solid;
    border-radius: 6px;
    padding: 14px;
    font-size: 20px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.2s ease;
    background: #fff;
    color: #333;
}

.rws-input-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #28a745;
}

.rws-input-wrapper span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    box-sizing: border-box;
    pointer-events: none;
}

.rws-input-wrapper span:nth-child(2) { transform: rotate(0deg); }
.rws-input-wrapper span:nth-child(3) { transform: rotate(90deg); }
.rws-input-wrapper span:nth-child(4) { transform: rotate(180deg); }
.rws-input-wrapper span:nth-child(5) { transform: rotate(270deg); }

.rws-input-wrapper span:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #28a745;
    animation: rws-animate-border 4s linear infinite;
}

@keyframes rws-animate-border {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.1% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

.rws-input-green {
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    z-index: 1;
}

.rws-input-green:focus {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.rws-input-orange {
    border-color: #ff8c00 !important;
    width: 100%;
    max-width: 400px;
    height: 50px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.rws-input-orange:focus {
    outline: none;
    border-color: #ff8c00 !important;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
    background-color: #fff7ed;
    transform: scale(0.98);
}

.rws-input-gray {
    border-color: #4a5568 !important;
    width: 100%;
    max-width: 400px;
    height: 50px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.rws-input-gray:focus {
    outline: none;
    border-color: #4a5568 !important;
    box-shadow: 0 0 15px rgba(74, 85, 104, 0.4);
    background-color: #f7fafc;
    transform: scale(0.98);
}

.rws-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 21px;
}

.rws-button {
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-family: inherit;
}

.rws-button-clear {
    background: transparent;
    color: #4a5568;
    text-decoration: underline;
    padding: 8px 12px;
    text-transform: none;
}

.rws-button-clear:hover {
    color: #ffffff;
    text-decoration: none;
    background: #6c757d;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.rws-popular-list{
    padding: 0px;
}

/* Results styling */
.rws-no-results {
    margin: 20px 0;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.rws-warning {
    font-weight: 600;
    margin-bottom: 15px;
    color: #856404;
    font-size: 16px;
}

.rws-suggestions {
    margin: 0;
    padding-left: 25px;
    color: #856404;
}

.rws-suggestions li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.rws-words-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rws-word-item {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif;
    letter-spacing: 1px;
    border: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.rws-word-item:hover {
    border-color: #28a745;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.rws-word-item.copied {
    background: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.rws-copy-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.rws-copy-btn:hover , .rws-copy-btn:focus , .rws-copy-btn:active {
    background: none !important;
}
.rws-word-item  span{
      white-space: nowrap;
}
.rws-word-item:hover .rws-copy-btn {
    opacity: 1;
}

.rws-copy-icon {
    width: 19px;
    height: 19px;
    fill: black;
}

.rws-best-picks {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
    position: relative;
    overflow: hidden;
}

.rws-best-picks::before {
    content: '★ ЛУЧШИЕ ВАРИАНТЫ';
    position: absolute;
    top: 0;
    right: 0;
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: bold;
    border-bottom-left-radius: 8px;
}

.rws-best-picks-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: black;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rws-best-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.rws-best-pick-item {
    padding: 12px;
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 10px;
    text-align: center;
}

.rws-best-pick-word {
    display: block;
    font-weight: 800;
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.rws-best-pick-score {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rws-words-count {
    margin: 15px 0;
    font-weight: 500;
    color: #495057;
    font-size: 15px;
}

/* Advanced Filters Toggle */
.rws-filter-toggle-wrapper {
    margin: 0px 0;
    text-align: center;
}

.rws-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    font-family: inherit;
}

.rws-filter-toggle:hover {
    background: #f8f9fa;
    border-color: #28a745;
    color: #28a745;
}

.rws-filter-toggle.active {
    background: #e7f3ff;
    border-color: #28a745;
    color: #28a745;
}

.rws-settings-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.rws-filter-toggle.active .rws-settings-icon {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

/* Advanced Filters */
.rws-advanced-filters {
    margin: 15px 0 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.rws-filter-group {
    margin-bottom: 20px;
}

.rws-filter-group:last-child {
    margin-bottom: 0;
}

.rws-filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
}

.rws-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.rws-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    user-select: none;
}

.rws-radio-label:hover {
    color:#28a745;
}

.rws-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color:#28a745;
}

.rws-radio-label span {
    line-height: 1.4;
}

.rws-button-submit {
    background: linear-gradient(180deg, #ffeb3b 0%, #ff9800 100%);
    color: #333;
    padding: 16px 48px;
    font-weight: 600;
    font-size: 16px;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
    50% { transform: scale(1.02); box-shadow: 0 6px 12px rgba(255, 152, 0, 0.3); }
    100% { transform: scale(1); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
}

.rws-button-submit:hover {
    background: linear-gradient(180deg, #ffc107 0%, #ff8c00 100%);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    animation: none;
}

.rws-button-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rws-results {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rws-results-content {
    line-height: 1.8;
}

.rws-results-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.rws-results-content p {
    margin-bottom: 20px;
    color: #666;
}

.rws-result-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border-left: 4px solid#28a745;
}

.rws-result-section ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.rws-result-section li {
    margin-bottom: 8px;
    list-style-type: none;
    position: relative;
    padding-left: 20px;
}

.rws-result-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color:#28a745;
    font-weight: bold;
}

.rws-icon-green,
.rws-icon-orange,
.rws-icon-gray {
    font-size: 18px;
    margin-right: 5px;
}

/* Error messages */
.rws-error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rws-field-green .rws-error-message {
    margin-top: 10px;
}

/* Popular queries */
.rws-popular-queries {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rws-popular-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.rws-popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rws-popular-list li {
    margin-bottom: 10px;
    padding: 0;
}

.rws-popular-link {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color:#28a745;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.rws-popular-link:hover {
    background: #e7f3ff;
    border-color:#28a745;
    color: black;
    text-decoration: none;
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .rws-container {
        padding: 5px;
    }
    
    .rws-field {
        flex-direction: column;
        gap: 10px;
    }
    
    .rws-label {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .rws-input-wrapper {
        width: 55px;
        height: 55px;
    }
    
    .rws-input-green {
        font-size: 18px;
    }
    
    .rws-input-group {
        gap: 6px;
        justify-content: center;
    }
    
    .rws-input-orange,
    .rws-input-gray {
        max-width: 100%;
    }
    
    .rws-button-submit {
        width: 100%;
        min-width: auto;
    }
}

