.crowd-ranker-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Results Display */
.cr-current-ranking {
    background: #f2f2f2;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cr-display-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cr-display-item {
    background: #f2f2f2;
    padding: 10px 0;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.cr-rank-number {
    font-weight: 500;
    color: #333;
    margin-right: 8px;
    min-width: 25px;
}

.cr-company-name {
    font-weight: 500;
    color: #333;
}

/* Voting Area */
.cr-voting-area {
    background: #f2f2f2;
    padding: 25px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.cr-voting-area h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.cr-instructions {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

/* Options Grid */
.cr-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.cr-option-item {
    background: #A4C2F4;
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: 2px solid #7FA8E8;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    min-height: 60px;
}

.cr-option-item:hover {
    background: #8FB1ED;
    border-color: #5A8DD6;
}

.cr-option-item.selected {
    background: #8FB1ED;
    border-color: #5A8DD6;
    border-width: 3px;
}

.cr-drag-handle {
    color: #333;
    font-size: 18px;
    margin-right: 10px;
    pointer-events: none;
    flex-shrink: 0;
}

.cr-option-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    word-break: break-word;
    flex: 1;
    line-height: 1.4;
    transition: max-width 0.3s ease;
}

.cr-option-item.selected .cr-option-name {
    padding-right: 10px;
}

/* Other Option Input */
.cr-other-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #2271b1;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 8px;
    box-sizing: border-box;
}

.cr-other-input:focus {
    outline: none;
    border-color: #135e96;
}

.cr-other-option.selected {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 12px;
}

.cr-other-option.selected .cr-option-name {
    max-width: 100% !important;
    padding-right: 0;
    margin-bottom: 8px;
}

.cr-other-option.selected .cr-inline-submit-btn {
    position: static;
    transform: none;
    margin: 8px auto 0;
}

/* Inline Submit Button */
.cr-inline-submit-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.cr-inline-submit-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.cr-inline-submit-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cr-fallback-icon {
    font-size: 40px;
    color: #2271b1;
    font-weight: bold;
}

/* Messages */
.cr-message {
    margin-top: 0;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.cr-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.cr-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.cr-voted-message {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.cr-voted-message p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.cr-submit-icon-template {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cr-options-grid {
        grid-template-columns: 1fr;
    }
    
    .cr-voting-area {
        padding: 20px;
    }
    
    .cr-voting-area h4 {
        font-size: 20px;
    }
    
    .cr-instructions {
        font-size: 14px;
    }
    
    .cr-option-name {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .crowd-ranker-container {
        padding: 15px;
    }
    
    .cr-voting-area {
        padding: 15px;
    }
    
    .cr-inline-submit-btn {
        width: 60px;
        height: 60px;
    }
    
    .cr-fallback-icon {
        font-size: 30px;
    }
}